[Bug middle-end/45364] Compiling wine's directx.c with -O1 -g takes a very long time

2014-01-28 Thread rguenth at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=45364

--- Comment #8 from Richard Biener rguenth at gcc dot gnu.org ---
Author: rguenth
Date: Tue Jan 28 09:02:59 2014
New Revision: 207172

URL: http://gcc.gnu.org/viewcvs?rev=207172root=gccview=rev
Log:
2014-01-28  Richard Biener  rguent...@suse.de

PR rtl-optimization/45364
PR rtl-optimization/59890
* var-tracking.c (local_get_addr_clear_given_value): Handle
already cleared slot.
(val_reset): Handle not allocated local_get_addr_cache.
(vt_find_locations): Use post-order on the inverted CFG.

Modified:
trunk/gcc/ChangeLog
trunk/gcc/var-tracking.c


[Bug rtl-optimization/59890] var-tracking.c:val_reset segfaults

2014-01-28 Thread rguenth at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=59890

--- Comment #3 from Richard Biener rguenth at gcc dot gnu.org ---
Author: rguenth
Date: Tue Jan 28 09:02:59 2014
New Revision: 207172

URL: http://gcc.gnu.org/viewcvs?rev=207172root=gccview=rev
Log:
2014-01-28  Richard Biener  rguent...@suse.de

PR rtl-optimization/45364
PR rtl-optimization/59890
* var-tracking.c (local_get_addr_clear_given_value): Handle
already cleared slot.
(val_reset): Handle not allocated local_get_addr_cache.
(vt_find_locations): Use post-order on the inverted CFG.

Modified:
trunk/gcc/ChangeLog
trunk/gcc/var-tracking.c


[Bug middle-end/58742] pointer arithmetic simplification

2014-01-28 Thread rguenther at suse dot de
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=58742

--- Comment #16 from rguenther at suse dot de rguenther at suse dot de ---
On Tue, 21 Jan 2014, glisse at gcc dot gnu.org wrote:

 http://gcc.gnu.org/bugzilla/show_bug.cgi?id=58742
 
 --- Comment #15 from Marc Glisse glisse at gcc dot gnu.org ---
 Another example: http://stackoverflow.com/q/21253690/1918193
 
 where we have (-DVERSION=2):
   _128 = img$_M_impl$_M_start_130 + 400;
   pretmp_146 = (long intD.12) _128;
   pretmp_145 = (long intD.12) img$_M_impl$_M_start_130;
   pretmp_76 = pretmp_146 - pretmp_145;
   pretmp_121 = pretmp_76 /[ex] 4;
   pretmp_120 = (size_typeD.24047) pretmp_121;
 
 We miss that pretmp_120 is a constant, VRP thus fails to eliminate the range
 checks, vectorization doesn't happen, and the code is more that 4 times slower
 than it should be.
 
 If the desired reassoc version is hard, a simple forwprop pattern matching
 would already go a long way to alleviate this issue.

I agree.  I have a patch.


[Bug middle-end/55500] [devirt] trunk fails inline-devirt test #7

2014-01-28 Thread herron.philip at googlemail dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=55500

Philip Herron herron.philip at googlemail dot com changed:

   What|Removed |Added

 CC||herron.philip at googlemail 
dot co
   ||m

--- Comment #3 from Philip Herron herron.philip at googlemail dot com ---
I just tried this test case with:

g++ -O2 -std=c++0x -fdump-tree-optimized test.cc -o test

g++ (GCC) 4.9.0 20131127 (experimental)

And it ran.


[Bug libstdc++/59656] weak_ptr::lock function crashes when compiling with -fno-exceptions flag

2014-01-28 Thread redi at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=59656

--- Comment #9 from Jonathan Wakely redi at gcc dot gnu.org ---
Author: redi
Date: Tue Jan 28 10:23:27 2014
New Revision: 207180

URL: http://gcc.gnu.org/viewcvs?rev=207180root=gccview=rev
Log:
2014-01-28  Jonathan Wakely  jwak...@redhat.com
Kyle Lippincott  spect...@google.com

PR libstdc++/59656
* include/bits/shared_ptr.h (shared_ptr): Add new non-throwing
constructor and grant friendship to weak_ptr.
(weak_ptr::lock()): Use new constructor.
* include/bits/shared_ptr_base.h
(_Sp_counted_base::_M_add_ref_lock_nothrow()): Declare new function
and define specializations.
(__shared_count): Add new non-throwing constructor.
(__shared_ptr): Add new non-throwing constructor and grant friendship
to __weak_ptr.
(__weak_ptr::lock()): Use new constructor.
* testsuite/20_util/shared_ptr/cons/43820_neg.cc: Adjust dg-error.
* testsuite/20_util/shared_ptr/cons/void_neg.cc: Likewise.

Modified:
trunk/libstdc++-v3/ChangeLog
trunk/libstdc++-v3/include/bits/shared_ptr.h
trunk/libstdc++-v3/include/bits/shared_ptr_base.h
trunk/libstdc++-v3/testsuite/20_util/shared_ptr/cons/43820_neg.cc
trunk/libstdc++-v3/testsuite/20_util/shared_ptr/cons/void_neg.cc


[Bug libstdc++/59656] weak_ptr::lock function crashes when compiling with -fno-exceptions flag

2014-01-28 Thread redi at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=59656

Jonathan Wakely redi at gcc dot gnu.org changed:

   What|Removed |Added

 Status|ASSIGNED|RESOLVED
 Resolution|--- |FIXED
   Target Milestone|--- |4.9.0

--- Comment #10 from Jonathan Wakely redi at gcc dot gnu.org ---
Fixed on trunk


[Bug c/59958] alpha does not deal with non-aligned returns from malloc() when doing byte wise access

2014-01-28 Thread martin at netbsd dot org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=59958

--- Comment #2 from Martin Husemann martin at netbsd dot org ---
Is the alignment expected from malloc() configurable in gcc and/or different
from the standard stack alignment?

A small test program along the lines of

  if ((uintptr_t)malloc(1)  mask) printf(yes\n) else printf(no\n);

and checking what gcc -O2 optimizes away for different masks seems to show that
on alpha  7 is optimized, while  15 is not. This sounds good for alpha.

However, I get the same results for amd64 - where I would have expected the
required alignement to be 16 byte. Is this a bug in our amd64 target
configuration, or am I misundertanding something?


[Bug tree-optimization/59920] [4.9 Regression] build doesn't terminate (at least after an hour)

2014-01-28 Thread jakub at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=59920

Jakub Jelinek jakub at gcc dot gnu.org changed:

   What|Removed |Added

  Attachment #31964|0   |1
is obsolete||
 Status|NEW |ASSIGNED
   Assignee|unassigned at gcc dot gnu.org  |jakub at gcc dot gnu.org

--- Comment #11 from Jakub Jelinek jakub at gcc dot gnu.org ---
Created attachment 31966
  -- http://gcc.gnu.org/bugzilla/attachment.cgi?id=31966action=edit
gcc49-pr59920.patch

Updated patch I'm going to bootstrap/regtest now.


[Bug c++/59916] [4.9 Regression] constructors and destructors can cause control reaches end of non-void function warnings with -Os

2014-01-28 Thread rguenth at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=59916

Richard Biener rguenth at gcc dot gnu.org changed:

   What|Removed |Added

   Target Milestone|--- |4.9.0

--- Comment #2 from Richard Biener rguenth at gcc dot gnu.org ---
Surely frontend related - after gimplification I see

B::B() (struct B * const this, const void * * __vtt_parm)
{
  struct B * retval;

  retval = B::B (this, 0, __vtt_parm);
}

which misses a return.


[Bug c/59967] New: Performance regression from 4.7.x to 4.8.x (loop not unrolled)

2014-01-28 Thread chbreitkopf at gmail dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=59967

Bug ID: 59967
   Summary: Performance regression from 4.7.x to 4.8.x (loop not
unrolled)
   Product: gcc
   Version: 4.8.2
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: c
  Assignee: unassigned at gcc dot gnu.org
  Reporter: chbreitkopf at gmail dot com

Created attachment 31967
  -- http://gcc.gnu.org/bugzilla/attachment.cgi?id=31967action=edit
preprocessed source of ray/src/rt/ambient.c

gcc 4.8.x generates 10-15% slower code compared to 4.7.x for Mark Stock's
radiance benchmark (http://markjstock.org/pages/rad_bench.html).

I observed this regression on Linux x86_64, and with different CPUs (Ivy
Bridge, Haswell, AMD Phenom, Kaveri). I had suspected the new register
allocator, but the actual cause is a difference in loop unrolling.

The hotspot is the nested loops with the recursive call at the end of the
sumambient() function. When using -Ofast, gcc 4.7.x will unroll the outer loop,
which results in some optimization possibilities in the inner loop. gcc 4.8.x
does not unroll the outer loop. -funroll-loops does not change the behavior.


[Bug rtl-optimization/59890] var-tracking.c:val_reset segfaults

2014-01-28 Thread rguenth at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=59890

--- Comment #4 from Richard Biener rguenth at gcc dot gnu.org ---
Author: rguenth
Date: Tue Jan 28 13:13:54 2014
New Revision: 207182

URL: http://gcc.gnu.org/viewcvs?rev=207182root=gccview=rev
Log:
2014-01-28  Richard Biener  rguent...@suse.de

Revert
2014-01-28  Richard Biener  rguent...@suse.de

PR rtl-optimization/45364
PR rtl-optimization/59890
* var-tracking.c (local_get_addr_clear_given_value): Handle
already cleared slot.
(val_reset): Handle not allocated local_get_addr_cache.
(vt_find_locations): Use post-order on the inverted CFG.

Modified:
trunk/gcc/ChangeLog
trunk/gcc/var-tracking.c


[Bug middle-end/45364] Compiling wine's directx.c with -O1 -g takes a very long time

2014-01-28 Thread rguenth at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=45364

--- Comment #9 from Richard Biener rguenth at gcc dot gnu.org ---
Author: rguenth
Date: Tue Jan 28 13:13:54 2014
New Revision: 207182

URL: http://gcc.gnu.org/viewcvs?rev=207182root=gccview=rev
Log:
2014-01-28  Richard Biener  rguent...@suse.de

Revert
2014-01-28  Richard Biener  rguent...@suse.de

PR rtl-optimization/45364
PR rtl-optimization/59890
* var-tracking.c (local_get_addr_clear_given_value): Handle
already cleared slot.
(val_reset): Handle not allocated local_get_addr_cache.
(vt_find_locations): Use post-order on the inverted CFG.

Modified:
trunk/gcc/ChangeLog
trunk/gcc/var-tracking.c


[Bug rtl-optimization/59890] var-tracking.c:val_reset segfaults

2014-01-28 Thread rguenth at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=59890

--- Comment #5 from Richard Biener rguenth at gcc dot gnu.org ---
Seems to break bootstrap now (with -maccumulate-outgoing-args change now for
i?86)
during libquadmath build where

/abuild/rguenther/obj/./gcc/xgcc -B/abuild/rguenther/obj/./gcc/
-B/usr/local/x86_64-unknown-linux-gnu/bin/
-B/usr/local/x86_64-unknown-linux-gnu/lib/ -isystem
/usr/local/x86_64-unknown-linux-gnu/include -isystem
/usr/local/x86_64-unknown-linux-gnu/sys-include -m32 -DHAVE_CONFIG_H -I.
-I/space/rguenther/src/svn/trunk/libquadmath -I
/space/rguenther/src/svn/trunk/libquadmath/../include -g -O2 -MT
printf/mul_n.lo -MD -MP -MF printf/.deps/mul_n.Tpo -c
/space/rguenther/src/svn/trunk/libquadmath/printf/mul_n.c -o printf/mul_n.o

doesn't converge anymore in vt_find_locations ().

Thus, reverted for now, testcase coming (to be attached here).


[Bug middle-end/59261] [4.9 regression] FAIL: gcc.dg/vect/bb-slp-26.c -flto -ffat-lto-objects (internal compiler error)

2014-01-28 Thread sch...@linux-m68k.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=59261

--- Comment #2 from Andreas Schwab sch...@linux-m68k.org ---
http://gcc.gnu.org/ml/gcc-testresults/2014-01/msg02171.html

It still fails the same.

There's a similar ICE in gcc.dg/vect/pr37539.c -flto -ffat-lto-objects:

$ gcc/xgcc -Bgcc/ ../gcc/testsuite/gcc.dg/vect/pr37539.c
-fno-diagnostics-show-caret -fdiagnostics-color=never -flto -ffat-lto-objects
-ftree-vectorize -fno-vect-cost-model -fno-common -O2 -fdump-tree-vect-details
-lm -o ./pr37539.exe
../gcc/testsuite/gcc.dg/vect/pr37539.c: In function ‘ayuv2yuyv_ref’:
../gcc/testsuite/gcc.dg/vect/pr37539.c:16:19: internal compiler error: in
expand_expr_real_2, at expr.c:9109
0x4056144f expand_expr_real_2(separate_ops*, rtx_def*, machine_mode,
expand_modifier)
../../gcc/expr.c:9109
0x4037bdcf expand_gimple_stmt_1
../../gcc/cfgexpand.c:3249
0x4037bdcf expand_gimple_stmt
../../gcc/cfgexpand.c:3309
0x4037ca3f expand_gimple_basic_block
../../gcc/cfgexpand.c:5149
0x40383f0f gimple_expand_cfg
../../gcc/cfgexpand.c:5715
0x40383f0f execute
../../gcc/cfgexpand.c:5935

[Bug c++/58639] [4.7/4.8/4.9 Regression] ICE on self-referential struct member

2014-01-28 Thread jason at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=58639

--- Comment #4 from Jason Merrill jason at gcc dot gnu.org ---
Author: jason
Date: Tue Jan 28 13:40:06 2014
New Revision: 207183

URL: http://gcc.gnu.org/viewcvs?rev=207183root=gccview=rev
Log:
PR c++/58639
* call.c (build_aggr_conv): Reject value-initialization of reference.

Added:
branches/gcc-4_7-branch/gcc/testsuite/g++.dg/cpp0x/initlist78.C
Modified:
branches/gcc-4_7-branch/gcc/cp/ChangeLog
branches/gcc-4_7-branch/gcc/cp/call.c


[Bug rtl-optimization/59890] var-tracking.c:val_reset segfaults

2014-01-28 Thread rguenth at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=59890

--- Comment #6 from Richard Biener rguenth at gcc dot gnu.org ---
typedef unsigned long int mp_limb_t;
typedef mp_limb_t * mp_ptr;
typedef const mp_limb_t * mp_srcptr;
typedef long int mp_size_t;
mp_limb_t __quadmath_mpn_add_n (mp_ptr, mp_srcptr, mp_srcptr, mp_size_t);
mp_limb_t __quadmath_mpn_addmul_1 (mp_ptr, mp_srcptr, mp_size_t, mp_limb_t);
void __quadmath_mpn_impn_mul_n_basecase (mp_ptr prodp, mp_srcptr up,
 mp_srcptr vp, mp_size_t size)
{
  mp_size_t i;
  mp_limb_t cy_limb;
  mp_limb_t v_limb = vp[0];
  for (i = 1; i  size; i++)
{
  if (v_limb = 1)
{
  cy_limb = 0;
  if (v_limb == 1)
cy_limb = __quadmath_mpn_add_n (prodp, prodp, up, size);
}
  else
cy_limb = __quadmath_mpn_addmul_1 (prodp, up, size, v_limb);
  prodp[size] = cy_limb;
}
}

fails to converge at -O2 -g -m32 with the patch applied.


[Bug c++/58837] [4.7/4.8/4.9 Regression] [c++11] ICE using invalid condition in static_assert

2014-01-28 Thread jason at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=58837

--- Comment #3 from Jason Merrill jason at gcc dot gnu.org ---
Author: jason
Date: Tue Jan 28 13:44:35 2014
New Revision: 207185

URL: http://gcc.gnu.org/viewcvs?rev=207185root=gccview=rev
Log:
PR c++/58837
* typeck.c (cp_truthvalue_conversion): Use explicit comparison for
FUNCTION_DECL.

Added:
branches/gcc-4_8-branch/gcc/testsuite/g++.dg/cpp0x/static_assert9.C
Modified:
branches/gcc-4_8-branch/gcc/cp/ChangeLog
branches/gcc-4_8-branch/gcc/cp/typeck.c


[Bug c++/59097] [4.7/4.8/4.9 Regression] ICE with invalid statement expression as array size

2014-01-28 Thread jason at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=59097

--- Comment #2 from Jason Merrill jason at gcc dot gnu.org ---
Author: jason
Date: Tue Jan 28 13:44:30 2014
New Revision: 207184

URL: http://gcc.gnu.org/viewcvs?rev=207184root=gccview=rev
Log:
PR c++/59097
* decl.c (compute_array_index_type): Don't call
maybe_constant_value for a non-integral expression.

Added:
branches/gcc-4_8-branch/gcc/testsuite/g++.dg/ext/stmtexpr15.C
Modified:
branches/gcc-4_8-branch/gcc/cp/ChangeLog
branches/gcc-4_8-branch/gcc/cp/decl.c


[Bug c++/58814] [4.7/4.8/4.9 Regression] ICE with volatile and attribute vector_size

2014-01-28 Thread jason at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=58814

--- Comment #3 from Jason Merrill jason at gcc dot gnu.org ---
Author: jason
Date: Tue Jan 28 13:44:41 2014
New Revision: 207186

URL: http://gcc.gnu.org/viewcvs?rev=207186root=gccview=rev
Log:
PR c++/58814
* typeck.c (cp_build_modify_expr): Make the RHS an rvalue before
stabilizing.

Added:
branches/gcc-4_8-branch/gcc/testsuite/g++.dg/ext/vector25.C
Modified:
branches/gcc-4_8-branch/gcc/cp/ChangeLog
branches/gcc-4_8-branch/gcc/cp/typeck.c


[Bug c++/58606] [4.8/4.9 Regression] [c++11] ICE with specialization in variadic template

2014-01-28 Thread jason at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=58606

--- Comment #3 from Jason Merrill jason at gcc dot gnu.org ---
Author: jason
Date: Tue Jan 28 13:44:57 2014
New Revision: 207189

URL: http://gcc.gnu.org/viewcvs?rev=207189root=gccview=rev
Log:
PR c++/58606
* pt.c (template_parm_to_arg): Call convert_from_reference.
(tsubst_template_arg): Don't strip reference refs.

Added:
branches/gcc-4_8-branch/gcc/testsuite/g++.dg/cpp0x/variadic146.C
Modified:
branches/gcc-4_8-branch/gcc/cp/ChangeLog
branches/gcc-4_8-branch/gcc/cp/pt.c


[Bug c++/58639] [4.7/4.8/4.9 Regression] ICE on self-referential struct member

2014-01-28 Thread jason at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=58639

--- Comment #5 from Jason Merrill jason at gcc dot gnu.org ---
Author: jason
Date: Tue Jan 28 13:44:51 2014
New Revision: 207188

URL: http://gcc.gnu.org/viewcvs?rev=207188root=gccview=rev
Log:
PR c++/58639
* call.c (build_aggr_conv): Reject value-initialization of reference.

Added:
branches/gcc-4_8-branch/gcc/testsuite/g++.dg/cpp0x/initlist78.C
Modified:
branches/gcc-4_8-branch/gcc/cp/ChangeLog
branches/gcc-4_8-branch/gcc/cp/call.c


[Bug c++/58504] [4.7/4.8/4.9 regression] ICE with type trait as default template parameter

2014-01-28 Thread jason at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=58504

--- Comment #3 from Jason Merrill jason at gcc dot gnu.org ---
Author: jason
Date: Tue Jan 28 13:45:02 2014
New Revision: 207190

URL: http://gcc.gnu.org/viewcvs?rev=207190root=gccview=rev
Log:
PR c++/58504
* pt.c (tsubst_copy_and_build) [TRAIT_EXPR]: Use tsubst for
types.

Added:
branches/gcc-4_8-branch/gcc/testsuite/g++.dg/ext/traits1.C
Modified:
branches/gcc-4_8-branch/gcc/cp/ChangeLog
branches/gcc-4_8-branch/gcc/cp/pt.c


[Bug c++/54652] [4.7/4.8/4.9 Regression] ICE with -g

2014-01-28 Thread jason at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=54652

--- Comment #4 from Jason Merrill jason at gcc dot gnu.org ---
Author: jason
Date: Tue Jan 28 13:45:08 2014
New Revision: 207191

URL: http://gcc.gnu.org/viewcvs?rev=207191root=gccview=rev
Log:
PR c++/54652
* decl.c (duplicate_decls): Always use oldtype for TYPE_DECL.

Added:
branches/gcc-4_8-branch/gcc/testsuite/g++.dg/ext/attrib48.C
Modified:
branches/gcc-4_8-branch/gcc/cp/ChangeLog
branches/gcc-4_8-branch/gcc/cp/decl.c


[Bug c++/58812] [4.7/4.8/4.9 Regression] ICE initializing an r-value reference with an initializer list

2014-01-28 Thread jason at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=58812

--- Comment #2 from Jason Merrill jason at gcc dot gnu.org ---
Author: jason
Date: Tue Jan 28 13:44:46 2014
New Revision: 207187

URL: http://gcc.gnu.org/viewcvs?rev=207187root=gccview=rev
Log:
PR c++/58812
* call.c (convert_like_real): Give helpful error about excess braces
for reference binding, too.

Added:
branches/gcc-4_8-branch/gcc/testsuite/g++.dg/cpp0x/initlist76.C
Modified:
branches/gcc-4_8-branch/gcc/cp/ChangeLog
branches/gcc-4_8-branch/gcc/cp/call.c


[Bug c++/54652] [4.7/4.8/4.9 Regression] ICE with -g

2014-01-28 Thread jason at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=54652

--- Comment #6 from Jason Merrill jason at gcc dot gnu.org ---
Author: jason
Date: Tue Jan 28 13:51:15 2014
New Revision: 207192

URL: http://gcc.gnu.org/viewcvs?rev=207192root=gccview=rev
Log:
PR c++/54652
* decl.c (duplicate_decls): Always use oldtype for TYPE_DECL.

Added:
branches/gcc-4_7-branch/gcc/testsuite/g++.dg/ext/attrib48.C
Modified:
branches/gcc-4_7-branch/gcc/cp/ChangeLog
branches/gcc-4_7-branch/gcc/cp/decl.c


[Bug c++/59097] [4.7/4.8/4.9 Regression] ICE with invalid statement expression as array size

2014-01-28 Thread jason at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=59097

Jason Merrill jason at gcc dot gnu.org changed:

   What|Removed |Added

 Status|ASSIGNED|RESOLVED
 Resolution|--- |FIXED
   Target Milestone|4.7.4   |4.8.3

--- Comment #3 from Jason Merrill jason at gcc dot gnu.org ---
Fixed for 4.8.3/4.9.  Not applying to 4.7.


[Bug c++/54652] [4.7/4.8/4.9 Regression] ICE with -g

2014-01-28 Thread jason at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=54652

Jason Merrill jason at gcc dot gnu.org changed:

   What|Removed |Added

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

--- Comment #5 from Jason Merrill jason at gcc dot gnu.org ---
Fixed.


[Bug c++/58837] [4.7/4.8/4.9 Regression] [c++11] ICE using invalid condition in static_assert

2014-01-28 Thread jason at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=58837

Jason Merrill jason at gcc dot gnu.org changed:

   What|Removed |Added

 Status|ASSIGNED|RESOLVED
 Resolution|--- |FIXED
   Target Milestone|4.7.4   |4.8.3

--- Comment #4 from Jason Merrill jason at gcc dot gnu.org ---
Fixed for 4.8.3/4.9.  Not fixing in 4.7.


[Bug c++/58814] [4.7/4.8/4.9 Regression] ICE with volatile and attribute vector_size

2014-01-28 Thread jason at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=58814

Jason Merrill jason at gcc dot gnu.org changed:

   What|Removed |Added

 Status|ASSIGNED|RESOLVED
 Resolution|--- |FIXED
   Target Milestone|4.7.4   |4.8.3

--- Comment #4 from Jason Merrill jason at gcc dot gnu.org ---
Fixed for 4.8.3/4.9.  Not fixing in 4.7.


[Bug c++/58812] [4.7/4.8/4.9 Regression] ICE initializing an r-value reference with an initializer list

2014-01-28 Thread jason at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=58812

Jason Merrill jason at gcc dot gnu.org changed:

   What|Removed |Added

 Status|ASSIGNED|RESOLVED
 Resolution|--- |FIXED
   Target Milestone|4.7.4   |4.8.3

--- Comment #3 from Jason Merrill jason at gcc dot gnu.org ---
Fixed for 4.8.3/4.9.  Not fixing in 4.7.


[Bug c++/58651] [4.7/4.8/4.9 Regression] ICE with invalid initializer list

2014-01-28 Thread jason at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=58651

Jason Merrill jason at gcc dot gnu.org changed:

   What|Removed |Added

 Status|ASSIGNED|RESOLVED
 Resolution|--- |FIXED
   Target Milestone|4.7.4   |4.8.3

--- Comment #3 from Jason Merrill jason at gcc dot gnu.org ---
Fixed for 4.8.3/4.9.  Not applying to 4.7.


[Bug c++/58639] [4.7/4.8/4.9 Regression] ICE on self-referential struct member

2014-01-28 Thread jason at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=58639

Jason Merrill jason at gcc dot gnu.org changed:

   What|Removed |Added

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

--- Comment #6 from Jason Merrill jason at gcc dot gnu.org ---
Fixed for 4.7.4/4.8.3/4.9.


[Bug c++/58504] [4.7/4.8/4.9 regression] ICE with type trait as default template parameter

2014-01-28 Thread jason at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=58504

Jason Merrill jason at gcc dot gnu.org changed:

   What|Removed |Added

 Status|ASSIGNED|RESOLVED
 Resolution|--- |FIXED
   Target Milestone|4.7.4   |4.8.3

--- Comment #4 from Jason Merrill jason at gcc dot gnu.org ---
Fixed for 4.8.3/4.9.  Not applying to 4.7 unless someone cares.


[Bug c++/58606] [4.8/4.9 Regression] [c++11] ICE with specialization in variadic template

2014-01-28 Thread jason at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=58606

Jason Merrill jason at gcc dot gnu.org changed:

   What|Removed |Added

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

--- Comment #4 from Jason Merrill jason at gcc dot gnu.org ---
Fixed for 4.8.3/4.9.


[Bug c++/59823] [4.7/4.8/4.9 Regression] conversion operator to const X causes copy-construction of temporary

2014-01-28 Thread jason at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=59823

Jason Merrill jason at gcc dot gnu.org changed:

   What|Removed |Added

   Target Milestone|--- |4.9.0

--- Comment #3 from Jason Merrill jason at gcc dot gnu.org ---
Fixed in 4.9.  Will apply to 4.8 later if no problems arise.


[Bug middle-end/59261] [4.9 regression] FAIL: gcc.dg/vect/bb-slp-26.c -flto -ffat-lto-objects (internal compiler error)

2014-01-28 Thread law at redhat dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=59261

--- Comment #3 from Jeffrey A. Law law at redhat dot com ---
Can you include -v on your command line.  It'd also be helpful if you could
include the intermediates generated by -save-temps.


[Bug target/59968] New: Unused BT patterns

2014-01-28 Thread hjl.tools at gmail dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=59968

Bug ID: 59968
   Summary: Unused BT patterns
   Product: gcc
   Version: 4.9.0
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: target
  Assignee: unassigned at gcc dot gnu.org
  Reporter: hjl.tools at gmail dot com
Target: x86/x86-64

There are some BT patterns in i386 guarded with
TARGET_USE_BT.  But there are no testcases to show
if they are used at all.

Also BT instructions supports memory destination.
But BT patterns only allow register destination.


[Bug libstdc++/59969] New: std::pair nonstandard constructor interferes when calling map::emplace with noncopyable nonmovable object

2014-01-28 Thread gcc.gnu.org.49489...@oli-obk.de
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=59969

Bug ID: 59969
   Summary: std::pair nonstandard constructor interferes when
calling map::emplace with noncopyable nonmovable
object
   Product: gcc
   Version: 4.8.2
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: libstdc++
  Assignee: unassigned at gcc dot gnu.org
  Reporter: gcc.gnu.org.49489...@oli-obk.de

Created attachment 31968
  -- http://gcc.gnu.org/bugzilla/attachment.cgi?id=31968action=edit
example that cannot be built due to the bug

see also:
http://stackoverflow.com/questions/21405674/why-do-i-need-to-use-piecewise-construct-in-mapemplace-for-single-arg-construc

the issue is that on construction of the pair, the nonstandard constructor

// DR 811.
templateclass _U1,
 class = typename enable_ifis_convertible_U1, _T1::value::type
constexpr pair(_U1 __x, const _T2 __y)
: first(std::forward_U1(__x)), second(__y) { }

 is preferred over the standard constructor

templateclass _U1, class _U2,
 class = typename enable_if__and_is_convertible_U1, _T1,
   is_convertible_U2, _T2
  ::value
   ::type
constexpr pair(_U1 __x, _U2 __y)
: first(std::forward_U1(__x)), second(std::forward_U2(__y)) { }


[Bug middle-end/58742] pointer arithmetic simplification

2014-01-28 Thread rguenth at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=58742

--- Comment #17 from Richard Biener rguenth at gcc dot gnu.org ---
Author: rguenth
Date: Tue Jan 28 14:53:52 2014
New Revision: 207194

URL: http://gcc.gnu.org/viewcvs?rev=207194root=gccview=rev
Log:
2014-01-28  Richard Biener  rguent...@suse.de

PR tree-optimization/58742
* tree-ssa-forwprop.c (associate_plusminus): Handle
pointer subtraction of the form (T)(P + A) - (T)P.

Modified:
trunk/gcc/ChangeLog
trunk/gcc/tree-ssa-forwprop.c


[Bug middle-end/58742] pointer arithmetic simplification

2014-01-28 Thread rguenth at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=58742

Richard Biener rguenth at gcc dot gnu.org changed:

   What|Removed |Added

 Status|NEW |ASSIGNED

--- Comment #18 from Richard Biener rguenth at gcc dot gnu.org ---
I'll tackle the EXACT_DIV_EXPR / MULT_EXPR cancellation next.  Seems easy
enough.


[Bug preprocessor/59935] [4.9 Regression] Firefox build fails with: built-in: internal compiler error: Segmentation fault

2014-01-28 Thread dodji at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=59935

--- Comment #9 from Dodji Seketeli dodji at gcc dot gnu.org ---
Author: dodji
Date: Tue Jan 28 15:03:19 2014
New Revision: 207195

URL: http://gcc.gnu.org/viewcvs?rev=207195root=gccview=rev
Log:
PR preprocessor/59935 - caret diagnostics crashes on non-file locations

gcc/ChangeLog

* input.c (location_get_source_line): Bail out on when line number
is zero, and test the return value of
lookup_or_add_file_to_cache_tab.

gcc/testsuite/ChangeLog

* c-c++-common/cpp/warning-zero-location.c: New test.
* c-c++-common/cpp/warning-zero-location-2.c: Likewise.

Signed-off-by: Dodji Seketeli do...@seketeli.org

Added:
trunk/gcc/testsuite/c-c++-common/cpp/warning-zero-location-2.c
trunk/gcc/testsuite/c-c++-common/cpp/warning-zero-location.c
Modified:
trunk/gcc/ChangeLog
trunk/gcc/input.c
trunk/gcc/testsuite/ChangeLog


[Bug sanitizer/59966] All plugin tests fails with --with-build-config=bootstrap-asan

2014-01-28 Thread hjl.tools at gmail dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=59966

H.J. Lu hjl.tools at gmail dot com changed:

   What|Removed |Added

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

--- Comment #1 from H.J. Lu hjl.tools at gmail dot com ---
Dup

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


[Bug testsuite/55440] Plugin tests is compiled with wrong CFLAGS

2014-01-28 Thread hjl.tools at gmail dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=55440

--- Comment #2 from H.J. Lu hjl.tools at gmail dot com ---
*** Bug 59966 has been marked as a duplicate of this bug. ***


[Bug testsuite/55440] Plugin tests is compiled with wrong CFLAGS

2014-01-28 Thread hjl.tools at gmail dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=55440

H.J. Lu hjl.tools at gmail dot com changed:

   What|Removed |Added

 Status|UNCONFIRMED |NEW
   Last reconfirmed||2014-01-28
   Target Milestone|--- |4.9.0
 Ever confirmed|0   |1


[Bug preprocessor/59935] [4.9 Regression] Firefox build fails with: built-in: internal compiler error: Segmentation fault

2014-01-28 Thread trippels at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=59935

Markus Trippelsdorf trippels at gcc dot gnu.org changed:

   What|Removed |Added

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

--- Comment #10 from Markus Trippelsdorf trippels at gcc dot gnu.org ---
Fixed. Thank you.


[Bug target/58622] With -fomit-frame-pointer, A64 does not generate post-decrement stores

2014-01-28 Thread rearnsha at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=58622

Richard Earnshaw rearnsha at gcc dot gnu.org changed:

   What|Removed |Added

 Status|UNCONFIRMED |NEW
   Last reconfirmed||2014-01-28
 Ever confirmed|0   |1

--- Comment #1 from Richard Earnshaw rearnsha at gcc dot gnu.org ---
Confirmed.  Prologue and epilogue code is constructed in the backend late on. 
Any optimizations have to be done during the code generation.  The particular
path with -fomit-frame-pointer is not on by default and clearly hasn't been
tuned yet.


[Bug c++/58466] [4.8/4.9 Regression] ICE in cxx_eval_constant_expression

2014-01-28 Thread trippels at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=58466

Markus Trippelsdorf trippels at gcc dot gnu.org changed:

   What|Removed |Added

 CC||chretien at lirmm dot fr

--- Comment #10 from Markus Trippelsdorf trippels at gcc dot gnu.org ---
*** Bug 59956 has been marked as a duplicate of this bug. ***


[Bug c++/59956] internal compiler error: unexpected expression ‘P_S’ of kind template_parm_index

2014-01-28 Thread trippels at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=59956

Markus Trippelsdorf trippels at gcc dot gnu.org changed:

   What|Removed |Added

 Status|NEW |RESOLVED
 Resolution|--- |DUPLICATE

--- Comment #3 from Markus Trippelsdorf trippels at gcc dot gnu.org ---
dup.

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


[Bug middle-end/58742] pointer arithmetic simplification

2014-01-28 Thread rguenth at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=58742

--- Comment #19 from Richard Biener rguenth at gcc dot gnu.org ---
The original identity will remain.  That is,

;; Function fx (fx, funcdef_no=0, decl_uid=1743, symbol_order=0)

fx (int * b, int * e)
{
  long int e.0_2;
  long int b.1_4;
  long int _5;
  long unsigned int _6;
  int * _7;

  bb 2:
  e.0_2 = (long int) e_1(D);
  b.1_4 = (long int) b_3(D);
  _5 = e.0_2 - b.1_4;
  _6 = (long unsigned int) _5;
  _7 = b_3(D) + _6;
  return _7;

}

that is to be pattern-matched separately, in associate_pointerplus.  Of course
that's only a piece of associating as b+5+(e-b) will then still not be
optimized.


[Bug target/59968] Unused BT patterns

2014-01-28 Thread hjl.tools at gmail dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=59968

H.J. Lu hjl.tools at gmail dot com changed:

   What|Removed |Added

 CC||areg.melikadamyan at gmail dot 
com
   ||, kirill.yukhin at intel dot 
com

--- Comment #2 from H.J. Lu hjl.tools at gmail dot com ---
For

int bar1;
void
__attribute__((noinline))
foo1 (int y)
{
  bar1 |= 1  y;
}

we generate:

movl$1, %eax
movl%edi, %ecx
sall%cl, %eax
orl%eax, bar1(%rip)
ret

I am expecting:

bts %edi, bar1(%rip)
ret


[Bug target/59968] Unused BT patterns

2014-01-28 Thread hjl.tools at gmail dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=59968

H.J. Lu hjl.tools at gmail dot com changed:

   What|Removed |Added

 Status|UNCONFIRMED |NEW
   Last reconfirmed||2014-01-28
 Ever confirmed|0   |1

--- Comment #1 from H.J. Lu hjl.tools at gmail dot com ---
For

int
__attribute__((noinline))
foo1 (int x, int y)
{
  x |= 1  y;
  return x;
}

we generate

movl%esi, %ecx
movl$1, %eax
sall%cl, %eax
orl%edi, %eax
ret

I am expecting

movl%edi, %eax
bts %esi, %eax
ret


[Bug target/59968] Unused BT patterns

2014-01-28 Thread ubizjak at gmail dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=59968

--- Comment #4 from Uroš Bizjak ubizjak at gmail dot com ---
The conversion to bt is somewhat fragile ATM, implemented with various
splitters. 

There was discussion to represent bit-test instructions with its own RTX, with
the intention to generate them from middle-end in a more consistent way.

[Bug middle-end/59261] [4.9 regression] FAIL: gcc.dg/vect/bb-slp-26.c -flto -ffat-lto-objects (internal compiler error)

2014-01-28 Thread sch...@linux-m68k.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=59261

--- Comment #5 from Andreas Schwab sch...@linux-m68k.org ---
Created attachment 31969
  -- http://gcc.gnu.org/bugzilla/attachment.cgi?id=31969action=edit
Intermediate files from -save-temps


[Bug target/59672] Add -m16 support for x86

2014-01-28 Thread hjl at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=59672

--- Comment #8 from hjl at gcc dot gnu.org hjl at gcc dot gnu.org ---
Author: hjl
Date: Tue Jan 28 16:22:45 2014
New Revision: 207196

URL: http://gcc.gnu.org/viewcvs?rev=207196root=gccview=rev
Log:
Add -m16 support for x86

The .code16gcc directive was added to binutils back in 1999:

---
   '.code16gcc' provides experimental support for generating 16-bit code
from gcc, and differs from '.code16' in that 'call', 'ret', 'enter',
'leave', 'push', 'pop', 'pusha', 'popa', 'pushf', and 'popf'
instructions default to 32-bit size.  This is so that the stack pointer
is manipulated in the same way over function calls, allowing access to
function parameters at the same stack offsets as in 32-bit mode.
'.code16gcc' also automatically adds address size prefixes where
necessary to use the 32-bit addressing modes that gcc generates.
---

It encodes 32-bit assembly instructions generated by GCC in 16-bit format
so that GCC can be used to generate 16-bit instructions.  To do that, the
.code16gcc directive must be placed at the very beginning of the assembly
code.  This patch adds -m16 to x86 backend by:

1. Add -m16 and make it mutually exclusive with -m32, -m64 and -mx32.
2. Treat -m16 like -m32 so that --32 is passed to assembler.
3. Output .code16gcc at the very beginning of the assembly code.
4. Turn off 64-bit ISA when -m16 is used.

PR target/59672
* config/i386/gnu-user64.h (SPEC_32): Add m16| to m32.
(SPEC_X32): Likewise.
(SPEC_64): Likewise.
* config/i386/i386.c (ix86_option_override_internal): Turn off
OPTION_MASK_ISA_64BIT, OPTION_MASK_ABI_X32 and OPTION_MASK_ABI_64
for TARGET_16BIT.
(x86_file_start): Output .code16gcc for TARGET_16BIT.
* config/i386/i386.h (TARGET_16BIT): New macro.
(TARGET_16BIT_P): Likewise.
* config/i386/i386.opt: Add m16.
* doc/invoke.texi: Document -m16.

Modified:
trunk/gcc/ChangeLog
trunk/gcc/config/i386/gnu-user64.h
trunk/gcc/config/i386/i386.c
trunk/gcc/config/i386/i386.h
trunk/gcc/config/i386/i386.opt
trunk/gcc/doc/invoke.texi


[Bug middle-end/59261] [4.9 regression] FAIL: gcc.dg/vect/bb-slp-26.c -flto -ffat-lto-objects (internal compiler error)

2014-01-28 Thread sch...@linux-m68k.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=59261

--- Comment #4 from Andreas Schwab sch...@linux-m68k.org ---
$ gcc/xgcc -B gcc/ ../gcc/testsuite/gcc.dg/vect/bb-slp-26.c -flto
-ffat-lto-objects -ftree-vectorize -fno-vect-cost-model -fno-common -O2 -v
Reading specs from gcc/specs
COLLECT_GCC=gcc/xgcc
COLLECT_LTO_WRAPPER=gcc/lto-wrapper
Target: ia64-suse-linux
Configured with: ../configure --prefix=/usr --build=ia64-suse-linux
--host=ia64-suse-linux --enable-checking=release --enable-shared
--with-system-zlib CFLAGS='-O2 -g' CXXFLAGS='-O2 -g'
Thread model: posix
gcc version 4.9.0 20140128 (experimental) [trunk revision 207160] (GCC) 
COLLECT_GCC_OPTIONS='-B' 'gcc/' '-flto' '-ffat-lto-objects' '-ftree-vectorize'
'-fvect-cost-model=unlimited' '-fno-common' '-O2' '-v'
 gcc/cc1 -quiet -v -iprefix
/usr/local/gcc/gcc-20140128/Build/gcc/../lib/gcc/ia64-suse-linux/4.9.0/
-isystem gcc/include -isystem gcc/include-fixed
../gcc/testsuite/gcc.dg/vect/bb-slp-26.c -quiet -dumpbase bb-slp-26.c -auxbase
bb-slp-26 -O2 -version -flto -ffat-lto-objects -ftree-vectorize
-fvect-cost-model=unlimited -fno-common -o /tmp/ccnI2B5p.s
GNU C (GCC) version 4.9.0 20140128 (experimental) [trunk revision 207160]
(ia64-suse-linux)
compiled by GNU C version 4.9.0 20140128 (experimental) [trunk revision
207160], GMP version 4.3.2, MPFR version 2.4.2, MPC version 1.0
GGC heuristics: --param ggc-min-expand=100 --param ggc-min-heapsize=131072
ignoring nonexistent directory
/usr/local/gcc/gcc-20140128/Build/gcc/../lib/gcc/ia64-suse-linux/4.9.0/include
ignoring nonexistent directory
/usr/local/gcc/gcc-20140128/Build/gcc/../lib/gcc/ia64-suse-linux/4.9.0/include-fixed
ignoring nonexistent directory
/usr/local/gcc/gcc-20140128/Build/gcc/../lib/gcc/ia64-suse-linux/4.9.0/../../../../ia64-suse-linux/include
ignoring nonexistent directory
/usr/local/gcc/gcc-20140128/Build/gcc/../lib/gcc/../../lib/gcc/ia64-suse-linux/4.9.0/include
ignoring nonexistent directory
/usr/local/gcc/gcc-20140128/Build/gcc/../lib/gcc/../../lib/gcc/ia64-suse-linux/4.9.0/include-fixed
ignoring nonexistent directory
/usr/local/gcc/gcc-20140128/Build/gcc/../lib/gcc/../../lib/gcc/ia64-suse-linux/4.9.0/../../../../ia64-suse-linux/include
#include ... search starts here:
#include ... search starts here:
 gcc/include
 gcc/include-fixed
 /usr/local/include
 /usr/include
End of search list.
GNU C (GCC) version 4.9.0 20140128 (experimental) [trunk revision 207160]
(ia64-suse-linux)
compiled by GNU C version 4.9.0 20140128 (experimental) [trunk revision
207160], GMP version 4.3.2, MPFR version 2.4.2, MPC version 1.0
GGC heuristics: --param ggc-min-expand=100 --param ggc-min-heapsize=131072
Compiler executable checksum: 9ec120f50573ca1e0b5055cf7d3946d0
COLLECT_GCC_OPTIONS='-B' 'gcc/' '-flto' '-ffat-lto-objects' '-ftree-vectorize'
'-fvect-cost-model=unlimited' '-fno-common' '-O2' '-v'
 gcc/as -v -x -o /tmp/ccIBjE6p.o /tmp/ccnI2B5p.s
GNU assembler version 2.23.1 (ia64-suse-linux) using BFD version (GNU Binutils;
SUSE Linux Enterprise 11) 2.23.1
COMPILER_PATH=gcc/
LIBRARY_PATH=gcc/:/lib/:/usr/lib/
COLLECT_GCC_OPTIONS='-B' 'gcc/' '-flto' '-ffat-lto-objects' '-ftree-vectorize'
'-fvect-cost-model=unlimited' '-fno-common' '-O2' '-v'
 gcc/collect2 -plugin gcc/liblto_plugin.so -plugin-opt=gcc/lto-wrapper
-plugin-opt=-fresolution=/tmp/ccAVXv8p.res -plugin-opt=-pass-through=-lgcc
-plugin-opt=-pass-through=-lgcc_s -plugin-opt=-pass-through=-lunwind
-plugin-opt=-pass-through=-lc -plugin-opt=-pass-through=-lgcc
-plugin-opt=-pass-through=-lgcc_s -plugin-opt=-pass-through=-lunwind -flto
-dynamic-linker /lib/ld-linux-ia64.so.2 /usr/lib/crt1.o /usr/lib/crti.o
gcc/crtbegin.o -Lgcc /tmp/ccIBjE6p.o -lgcc --as-needed -lgcc_s -lunwind
--no-as-needed -lc -lgcc --as-needed -lgcc_s -lunwind --no-as-needed
gcc/crtend.o /usr/lib/crtn.o
 gcc/xgcc @/tmp/cc8GnggF.args
Reading specs from gcc/specs
COLLECT_GCC=gcc/xgcc
Target: ia64-suse-linux
Configured with: ../configure --prefix=/usr --build=ia64-suse-linux
--host=ia64-suse-linux --enable-checking=release --enable-shared
--with-system-zlib CFLAGS='-O2 -g' CXXFLAGS='-O2 -g'
Thread model: posix
gcc version 4.9.0 20140128 (experimental) [trunk revision 207160] (GCC) 
COLLECT_GCC_OPTIONS='-c' '-B' 'gcc/' '-ffat-lto-objects' '-ftree-vectorize'
'-fvect-cost-model=unlimited' '-fno-common' '-O2' '-v'
'-fltrans-output-list=/tmp/cceMmjdF.ltrans.out' '-fwpa'
'-fresolution=/tmp/ccAVXv8p.res'
 gcc/lto1 -quiet -dumpbase ccIBjE6p.o -auxbase ccIBjE6p -O2 -version
-ffat-lto-objects -ftree-vectorize -fvect-cost-model=unlimited -fno-common
-fltrans-output-list=/tmp/cceMmjdF.ltrans.out -fwpa
-fresolution=/tmp/ccAVXv8p.res @/tmp/ccDZYbNE
GNU GIMPLE (GCC) version 4.9.0 20140128 (experimental) [trunk revision 207160]
(ia64-suse-linux)
compiled by GNU C version 4.9.0 20140128 (experimental) [trunk revision
207160], GMP version 4.3.2, MPFR version 2.4.2, MPC version 1.0
GGC heuristics: --param ggc-min-expand=100 --param ggc-min-heapsize=131072
GNU GIMPLE (GCC) version

[Bug tree-optimization/59679] gcc version 4.7.3 and gcc version 4.5.3 cause an unaligned access exception on NetBSD/Alpha

2014-01-28 Thread ubizjak at gmail dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=59679

Uroš Bizjak ubizjak at gmail dot com changed:

   What|Removed |Added

 Status|WAITING |NEW
  Component|target  |tree-optimization
   Target Milestone|--- |4.7.4

--- Comment #13 from Uroš Bizjak ubizjak at gmail dot com ---
Confirmed as tree-optimization problem on 4.9 branch.

The compiler was build as a crosscompiler from x86_64-linux-gnu to
alpha-linux-gnu, configured with configure --target=alpha-linux-gnu.

The preprocessed source from comment 12 is compiled with:

a) gcc-build-alpha/gcc/cc1 -O2 -fno-tree-ter -fpreprocessed
scope-reduced-preprocessed.c
b) gcc-build-alpha/gcc/cc1 -O2 -fpreprocessed scope-reduced-preprocessed.c

where a) creates correct binary (scope-reduced.s) and b) creates wrong binary
(scope-reduced_.s).

The difference between scope-reduced.s (correct) and scope-reduced_.s (wrong):

--- scope-reduced.s 2014-01-28 17:45:07.803092987 +0100
+++ scope-reduced_.s2014-01-28 17:44:50.365312704 +0100
@@ -16,7 +16,7 @@
 $Perl_leave_scope..ng:
lda $30,-16($30)
cpys $f31,$f31,$f31
-   mov $31,$5
+   mov $31,$6
ldl $1,48($16)
mov $31,$8
stq $26,0($30)
@@ -33,10 +33,10 @@
s8addq $2,$1,$1
ldq $3,0($1)
and $3,63,$18
-   cmpule $18,4,$6
-   bne $6,$L3
+   cmpule $18,4,$5
+   bne $5,$L3
cmpule $18,20,$2
-   ldq $5,-8($1)
+   ldq $6,-8($1)
beq $2,$L4
lda $2,-8($1)
 $L5:
@@ -65,14 +65,12 @@
br $31,$L5
.align 4
 $L17:
-   sll $3,48,$3
-   ldq_u $1,0($5)
-   sra $3,56,$3
-   mskbl $1,$5,$1
-   insbl $3,$5,$3
+   extbl $3,1,$3
+   ldl $1,0($6)
+   bic $1,255,$1
cpys $f31,$f31,$f31
bis $3,$1,$3
-   stq_u $3,0($5)
+   stl $3,0($6)
ldl $1,48($16)
cmplt $17,$1,$2
bne $2,$L12
@@ -84,24 +82,24 @@
 $L9:
ldl $2,12($8)
ldl $1,48($16)
-   bis $5,$2,$2
+   bis $6,$2,$2
stl $2,12($8)
br $31,$L2
.align 4
 $L8:
ldq $3,0($16)
ldq $22,24($16)
-   ldq $4,0($5)
+   ldq $4,0($6)
bis $31,$31,$31
mov $2,$1
-   ldq $6,0($7)
+   ldq $5,0($7)
subq $3,$22,$2
cpys $f31,$f31,$f31
sra $2,3,$2
stq $2,16($4)
ldq $4,16($7)
-   ldq $3,24($6)
-   ldq $2,16($6)
+   ldq $3,24($5)
+   ldq $2,16($5)
stq $4,24($16)
s8addq $3,$4,$3
stq $7,184($16)

The problem can be seen just after $L17 label.

[Bug target/59968] Unused BT patterns

2014-01-28 Thread ubizjak at gmail dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=59968

--- Comment #3 from Uroš Bizjak ubizjak at gmail dot com ---
(In reply to H.J. Lu from comment #0)
 There are some BT patterns in i386 guarded with
 TARGET_USE_BT.  But there are no testcases to show
 if they are used at all.

testsuite/gcc.target/i386/bt-*.c

 Also BT instructions supports memory destination.
 But BT patterns only allow register destination.

bt with a memory operand is slow. The bitpos argument is not limited to operand
size, and is primarily used for locked memory access.

BTW:

$ objdump -d cc1 | grep bt  | wc -l
1228

[Bug tree-optimization/59932] spurious undefined behavior warning on valid code

2014-01-28 Thread jakub at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=59932

Jakub Jelinek jakub at gcc dot gnu.org changed:

   What|Removed |Added

 CC||jakub at gcc dot gnu.org

--- Comment #5 from Jakub Jelinek jakub at gcc dot gnu.org ---
(In reply to Zhendong Su from comment #2)
 (In reply to Andrew Pinski from comment #1)
  I don't see why you think this is not undefined behavior.
  If p1 starts at 1, it cannot turn into 0 as p1++ overflows during the
  2147483646th iteration.
 
 Andrew, because d.f1  l is false, so the code simply returns (return
 b;). 
 
 I also always double-check with CompCert's reference interpreter and Frama-C
 if possible.

There clearly is a loop with undefined behavior if it is every entered (several
of them), but you just never happen to enter it.  Whether to warn about bugs in
obviously dead code is a heated debate, some people ask for it, others don't
want it, but in this case whether the compiler knows it is dead code or not
depends on optimizations.  GCC doesn't warn about the other loops because they
have multiple exits and the -Waggressive-loop-optimization warning is, in order
to have as few false positives as possible, only used for the most simple
loops.

Anyway, in this case IMHO it is very well worth the false positive in this
case, rather than never warning because we can't be 100% sure if it isn't in
dead code.
After all, we couldn't then warn about
int a[3];
void foo (void)
{
  for (int i = 0; i  4; i++)
a[i]++;
}
just because main might not call foo at all and thus you'd never invoke the
undefined behavior.


[Bug target/59968] Unused BT patterns

2014-01-28 Thread hjl.tools at gmail dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=59968

--- Comment #5 from H.J. Lu hjl.tools at gmail dot com ---
For

int
__attribute__((noinline))
foo1 (int x, int y)
{
  x = (1  y);
  return x != 0;
}

we generate

movl%esi, %ecx
movl$1, %eax
sall%cl, %eax
testl%edi, %eax
setne%al
movzbl%al, %eax
ret

I am expecting:

bt  %esi, %edi
setc%al
movzbl%al, %eax
ret


[Bug c++/53756] [C++1y] ICE: in gen_type_die_with_usage, at dwarf2out.c:18774 with -g and operator auto ()

2014-01-28 Thread jason at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=53756

--- Comment #6 from Jason Merrill jason at gcc dot gnu.org ---
Author: jason
Date: Tue Jan 28 17:06:40 2014
New Revision: 207197

URL: http://gcc.gnu.org/viewcvs?rev=207197root=gccview=rev
Log:
PR c++/53756
gcc/
* dwarf2out.c (auto_die): New static.
(gen_type_die_with_usage): Handle C++1y 'auto'.
(gen_subprogram_die): If in-class DIE had 'auto', emit type again
on definition.
gcc/cp/
* mangle.c (write_unqualified_name): Handle operator auto.

Added:
trunk/gcc/testsuite/g++.dg/cpp1y/auto-fn22.C
trunk/gcc/testsuite/g++.dg/debug/dwarf2/auto1.C
Modified:
trunk/gcc/ChangeLog
trunk/gcc/cp/ChangeLog
trunk/gcc/cp/mangle.c
trunk/gcc/dwarf2out.c
trunk/gcc/testsuite/g++.dg/cpp1y/auto-fn12.C


[Bug c++/53756] [C++1y] ICE: in gen_type_die_with_usage, at dwarf2out.c:18774 with -g and operator auto ()

2014-01-28 Thread jason at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=53756

Jason Merrill jason at gcc dot gnu.org changed:

   What|Removed |Added

   Target Milestone|--- |4.9.0

--- Comment #7 from Jason Merrill jason at gcc dot gnu.org ---
Fixed in 4.9 so far.


[Bug tree-optimization/59679] gcc version 4.7.3 and gcc version 4.5.3 cause an unaligned access exception on NetBSD/Alpha

2014-01-28 Thread ubizjak at gmail dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=59679

--- Comment #14 from Uroš Bizjak ubizjak at gmail dot com ---
There is no differences in .optimized tree dumps.

[Bug fortran/59941] [4.7 Regression] [OOP] ICE with polymorphic types

2014-01-28 Thread janus at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=59941

--- Comment #10 from janus at gcc dot gnu.org ---
(In reply to janus from comment #8)
 Backtrace from gdb:
 
 
 Program received signal SIGSEGV, Segmentation fault.
 0x004d19d6 in replace_comp (expr=expr@entry=0x146cc10,
 sym=sym@entry=0x146f7a0, i=i@entry=0x7fffdc6c)
 at /home/jweil/gcc47/branch/gcc/fortran/expr.c:4199
 4199  !gfc_is_intrinsic (expr-symtree-n.sym, 0, expr-where)))
 (gdb) bt
 #0  0x004d19d6 in replace_comp (expr=expr@entry=0x146cc10,
 sym=sym@entry=0x146f7a0, i=i@entry=0x7fffdc6c)
 at /home/jweil/gcc47/branch/gcc/fortran/expr.c:4199

Here in replace_comp, the sym is 'get_smatrix', and the problem is that
expr-symtree is NULL.


 #1  0x004d46ba in gfc_traverse_expr (expr=0x146cc10,
 sym=sym@entry=0x146f7a0, 
 func=func@entry=0x4d19a0 replace_comp, f=f@entry=0) at
 /home/jweil/gcc47/branch/gcc/fortran/expr.c:3929
 #2  0x004d6c9c in gfc_expr_replace_comp (expr=optimized out,
 dest=dest@entry=0x146f7a0)
 at /home/jweil/gcc47/branch/gcc/fortran/expr.c:4218
 #3  0x00524615 in resolve_fl_derived0 (sym=sym@entry=0x146e590)
 at /home/jweil/gcc47/branch/gcc/fortran/resolve.c:11724
 #4  0x0052c80d in resolve_fl_derived (sym=sym@entry=0x146e590)
 at /home/jweil/gcc47/branch/gcc/fortran/resolve.c:12046

In here the sym is '__vtype_beam_structures_Beam_structure_t' (the vtabs and
vtypes are always imported when loading a module).

[Bug c++/59598] very simple code using file open for read

2014-01-28 Thread denis.v.koles...@safe-mail.net
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=59598

Denis Kolesnik denis.v.koles...@safe-mail.net changed:

   What|Removed |Added

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

--- Comment #34 from Denis Kolesnik denis.v.koles...@safe-mail.net ---
// a small text file filter.c //

#include stdio.h





main(int argc, char* argv[])

{


char c, previous_c;   

int word_begin_position[3000];


//int spec_symbol[7]={0xAE,0xBB,0xAB,0xA9,0x22,0x2F,0x27};


//int eof_symbol[2]={0x0D,0x0A};
int search_result;

int this_is_the_same_word;
int words_count;
int word_number;

int search_result_A_count;
int search_result_space;

FILE *stream,*stream2;


int i, j, characters_count, character_number;
int other_character_printed;


// double characters
int A_count, E_count;



characters_count=0;

stream = fopen (argv[1],r);

while ((c = fgetc(stream)) != EOF) 

{
characters_count++;

}
fclose(stream);
//printf(total characters are %i\n, characters_count); 


character_number=1;
words_count=0;
previous_c=0;


stream = fopen (argv[1],r);

while ((c = fgetc(stream)) != EOF) 

{
if(((c!=0x20)  (character_number==1)) || ((previous_c==0x20) 
(c!=0x20)  (c!=0x0A)) || ((previous_c!=0x20)  (c==0x0D)) || ((c!=0x20) 
(c!=0x0D)  (c!=0x0A)  (previous_c==0x0A)) || ((previous_c!=0x20) 
(previous_c!=0x0A)  (character_number==characters_count)  (c==0x20)))

//1. ((c!=0x20)  (character_number==1))
//2. ((previous_c==0x20)  (c!=0x20)  (c!=0x0A))
//3. ((previous_c!=0x20)  (c==0x0D))
//!((previous_c!=0x0D)  (c==0x0A))
//4. ((c!=0x20)  (c!=0x0D)  (c!=0x0A)  (previous_c==0x0A))
//5. ((previous_c!=0x20)  (previous_c!=0x0A) 
(character_number==characters_count)  (c==0x20))

this_is_the_same_word=0;
else
this_is_the_same_word=1;

if(this_is_the_same_word==0)
{
words_count++;
word_begin_position[words_count]=character_number;

//printf( the begin char is .
%i,word_begin_position[words_count]);
}

//if(character_number==characters_count)
//printf(the last character);
/*
printf( the number of words is %i\n, words_count);
printf( the current character is . %c\n, c);
if(c==0x0D)
printf( the current character is . 0x0D\n);
if(c==0x0A)
printf( the current character is . 0x0A\n);
*/
previous_c=c;
character_number++;
}
fclose(stream);



word_number=1;
character_number=1;

A_count=1;
E_count=1;

stream = fopen (argv[1],r);

//stream2 = fopen (argv[2],w);

while ((c = fgetc(stream)) != EOF) 

{

other_character_printed=0;
if(words_count=2)
if(word_numberwords_count-1)
if((character_number = word_begin_position[word_number]) 
(character_number  word_begin_position[word_number+1]))
{
A_count=1;
E_count=1;

word_number++;
}

//printf(\n the word begin position
%i\n,word_begin_position[word_number]);
//printf(\n1 char is %i\n, character_number);
//printf(\nthe words count is %i\n, words_count);

// A
if((other_character_printed==0)  ((c=='a') || (c=='а') || (c=='A') ||
(c=='А')) )
if(A_count==1)
{
printf(A1);
A_count=2;
other_character_printed=1;
}
else
{
printf(A2);
A_count=1;
other_character_printed=1;
}
else
if((other_character_printed==0)  ((c!='е')  (c!='e')  (c!='Е') 
(c!='E')))
{
printf(%c, c);
other_character_printed=1;
}

// E
if((other_character_printed==0)  ((c=='e') || (c=='е') || (c=='E') ||
(c=='Е')) )
if(E_count==1)
{
printf(E1);
E_count=2;
other_character_printed=1;
}
else
{
printf(E2);
E_count=1;
other_character_printed=1;
}
else
if((other_character_printed==0)  ((c!='a')  (c!='а')  (c!='А') 
(c!='A')))
{
printf(%c, c);
other_character_printed=1;
}


//if(c=='0')
//{
//printf(%c, c);
//other_character_printed=1;
//}


character_number++;
}
fclose(stream);
//printf( the number of words is %i, words_count);



return 0;

}

[Bug target/59968] Unused BT patterns

2014-01-28 Thread hjl.tools at gmail dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=59968

--- Comment #6 from H.J. Lu hjl.tools at gmail dot com ---
For

int
__attribute__((noinline))
foo1 (int x, int y)
{
  int z;
  z = x  (1  y);
  x |= 1  y;
  x = ~z;
  return x;
}

we generate:

movl%esi, %ecx
movl$1, %edx
sall%cl, %edx
movl%edx, %eax
orl%edi, %eax
andl%edx, %edi
notl%edi
andl%edi, %eax
ret

I expect:
movl%edi, %eax
btc %esi, %eax
ret


[Bug c++/59598] very simple code using file open for read

2014-01-28 Thread denis.v.koles...@safe-mail.net
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=59598

--- Comment #35 from Denis Kolesnik denis.v.koles...@safe-mail.net ---
it works with every russian letter except small letter ya, I consider it as a
bug.


[Bug target/59968] Unused BT patterns

2014-01-28 Thread hjl.tools at gmail dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=59968

--- Comment #7 from H.J. Lu hjl.tools at gmail dot com ---
For

int
__attribute__((noinline))
foo1 (int x, int y)
{
  x = ~(1  y);
  return x;
}

we generate

movl%esi, %ecx
movl$-2, %eax
roll%cl, %eax
andl%edi, %eax
ret

I expect

movl%edi, %eax
btr %esi, %eax
ret


[Bug fortran/59941] [4.7 Regression] [OOP] ICE with polymorphic types

2014-01-28 Thread janus at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=59941

--- Comment #11 from janus at gcc dot gnu.org ---
The reason why the ICE is gone in 4.8 is that 'replace_comp' was completely
removed in r195562 (for PR 54107). However this commit is a bit too heavy for a
backport, I guess.


[Bug fortran/59941] [4.7 Regression] [OOP] ICE with polymorphic types

2014-01-28 Thread janus at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=59941

janus at gcc dot gnu.org changed:

   What|Removed |Added

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

--- Comment #12 from janus at gcc dot gnu.org ---
Here is a more lightweight fix (pretty much straightforward):

Index: gcc/fortran/expr.c
===
--- gcc/fortran/expr.c(revision 207198)
+++ gcc/fortran/expr.c(working copy)
@@ -4195,7 +4195,7 @@ replace_comp (gfc_expr *expr, gfc_symbol *sym, int
   gfc_component *comp;
   comp = (gfc_component *)sym;
   if ((expr-expr_type == EXPR_VARIABLE 
-   || (expr-expr_type == EXPR_FUNCTION
+   || (expr-expr_type == EXPR_FUNCTION  !expr-value.function.isym
 !gfc_is_intrinsic (expr-symtree-n.sym, 0, expr-where)))
expr-symtree-n.sym-ns == comp-ts.interface-formal_ns)
 {


Removes the ICE on comment 0, comment 5 and comment 7.


[Bug target/59968] Unused BT patterns

2014-01-28 Thread hjl.tools at gmail dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=59968

--- Comment #8 from H.J. Lu hjl.tools at gmail dot com ---
For

int bar1;
void
__attribute__((noinline))
foo1 (int y)
{
  if (!(bar1  (1  y)))
bar1 |= 1  y;
}

we generate

movlbar1(%rip), %eax
btl%edi, %eax
jc.L1
movl$1, %edx
movl%edi, %ecx
sall%cl, %edx
orl%edx, %eax
movl%eax, bar1(%rip)
.L1:
rep ret

I expect:

bts %edi, bar2(%rip)
ret


[Bug tree-optimization/59932] spurious undefined behavior warning on valid code

2014-01-28 Thread su at cs dot ucdavis.edu
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=59932

--- Comment #6 from Zhendong Su su at cs dot ucdavis.edu ---
Thanks for your explanation Jakub. It's more clear now, but I still don't fully
understand the difference in behavior from 4.8 to the current trunk. 

Is it because 4.8's support for warning undefined behaviors is weaker than
4.9's, and with that enhanced support, 4.9 sometimes gives false warnings like
the one reported here?


[Bug target/59968] Unused BT patterns

2014-01-28 Thread hjl.tools at gmail dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=59968

--- Comment #9 from H.J. Lu hjl.tools at gmail dot com ---
For

int bar1;
void
__attribute__((noinline))
foo1 (int y)
{
  if (!(bar1  (1  y)))
{
  bar1 |= 1  y;
  xxx1 ();
}
}

we generate

.cfi_startproc
movlbar1(%rip), %eax
btl%edi, %eax
jnc.L5
rep ret
.p2align 4,,10
.p2align 3
.L5:
movl$1, %edx
movl%edi, %ecx
sall%cl, %edx
orl%edx, %eax
movl%eax, bar1(%rip)
jmpxxx1

I expect

bts %edi, bar2(%rip)
jc .L7
jmpxxx2
.L8:
.p2align 4,,10
.p2align 3
.L7:
rep ret


[Bug target/59968] Unused BT patterns

2014-01-28 Thread hjl.tools at gmail dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=59968

--- Comment #10 from H.J. Lu hjl.tools at gmail dot com ---
For

int bar1;
void
__attribute__((noinline))
foo1 (int y)
{
  if ((bar1  (1  y)))
{
  bar1 = ~(1  y);
  xxx1 ();
}
}

we generate

movlbar1(%rip), %eax
btl%edi, %eax
jc.L5
rep ret
.p2align 4,,10
.p2align 3
.L5:
movl$-2, %edx
movl%edi, %ecx
roll%cl, %edx
andl%edx, %eax
movl%eax, bar1(%rip)
jmpxxx1

I expect
btr %edi, bar2(%rip)
jnc .L7
jmpxxx2
.L8:
.p2align 4,,10
.p2align 3
.L7:
rep ret


[Bug target/59968] Unused BT patterns

2014-01-28 Thread hjl.tools at gmail dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=59968

--- Comment #11 from H.J. Lu hjl.tools at gmail dot com ---
For

int bar1;
void
__attribute__((noinline))
foo1 (int y)
{
  if ((bar1  (1  y)))
bar1 = ~(1  y);
}

we generate

.cfi_startproc
movlbar1(%rip), %eax
btl%edi, %eax
jnc.L1
movl$-2, %edx
movl%edi, %ecx
roll%cl, %edx
andl%edx, %eax
movl%eax, bar1(%rip)
.L1:
rep ret

I expect

btr %edi, bar2(%rip)
ret


[Bug middle-end/59679] gcc version 4.7.3 and gcc version 4.5.3 cause an unaligned access exception on NetBSD/Alpha

2014-01-28 Thread ubizjak at gmail dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=59679

Uroš Bizjak ubizjak at gmail dot com changed:

   What|Removed |Added

  Component|tree-optimization   |middle-end

--- Comment #15 from Uroš Bizjak ubizjak at gmail dot com ---
(In reply to Uroš Bizjak from comment #13)
 Confirmed as tree-optimization problem on 4.9 branch.

Actually, a middle-end problem, if at all. With -ftree-ter, expand creates a
couple of unaligned loads to arg0:

(insn 101 100 102 (set (reg:SI 150)
(mem:SI (reg/v/f:DI 115 [ arg0 ]) [0  S4 A8])) scope-reduced.c:60 -1
 (nil))
...
(insn 105 104 106 17 (set (mem:SI (reg/v/f:DI 115 [ arg0 ]) [0  S4 A8])
(reg:SI 151)) scope-reduced.c:60 -1
 (nil))

[Bug middle-end/59679] gcc version 4.7.3 and gcc version 4.5.3 cause an unaligned access exception on NetBSD/Alpha

2014-01-28 Thread ubizjak at gmail dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=59679

--- Comment #16 from Uroš Bizjak ubizjak at gmail dot com ---
(In reply to Uroš Bizjak from comment #15)
 (In reply to Uroš Bizjak from comment #13)
  Confirmed as tree-optimization problem on 4.9 branch.
 
 Actually, a middle-end problem, if at all. With -ftree-ter, expand creates a
 couple of unaligned loads to arg0:

s/loads/moves/

[Bug target/59968] Unused BT patterns

2014-01-28 Thread hjl.tools at gmail dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=59968

--- Comment #12 from H.J. Lu hjl.tools at gmail dot com ---
For

int bar1;
void
__attribute__((noinline))
foo1 (int y)
{
  int z;
  if (!(bar1  (1  y)))
xxx1 ();
  z = bar1  (1  y);
  bar1 |= 1  y;
  bar1 = ~z;
}

we generate

movlbar1(%rip), %edx
pushq%rbx
.cfi_def_cfa_offset 16
.cfi_offset 3, -16
movl%edi, %ebx
btl%edi, %edx
jc.L3
callxxx1
movlbar1(%rip), %edx
.L3:
movl%ebx, %ecx
movl$1, %eax
sall%cl, %eax
movl%edx, %ecx
andl%eax, %ecx
orl%edx, %eax
notl%ecx
andl%ecx, %eax
movl%eax, bar1(%rip)
popq%rbx
.cfi_def_cfa_offset 8
ret

I expect

btc %edi, bar2(%rip)
jc .L7
jmpxxx2
.L8:
.p2align 4,,10
.p2align 3
.L7:
rep ret


[Bug target/59968] Unused BT patterns

2014-01-28 Thread ubizjak at gmail dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=59968

--- Comment #13 from Uroš Bizjak ubizjak at gmail dot com ---
(In reply to H.J. Lu from comment #8)
 
 I expect:
 
   bts %edi, bar2(%rip)

Did you see Comment #3?

[Bug c++/58701] [4.9 Regression] [c++11] ICE initializing member of static union

2014-01-28 Thread jason at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=58701

Jason Merrill jason at gcc dot gnu.org changed:

   What|Removed |Added

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


[Bug target/59968] Unused BT patterns

2014-01-28 Thread ubizjak at gmail dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=59968

--- Comment #14 from Uroš Bizjak ubizjak at gmail dot com ---
From i386.md:

;; %%% bts, btr, btc, bt.
;; In general these instructions are *slow* when applied to memory,
;; since they enforce atomic operation.  When applied to registers,
;; it depends on the cpu implementation.  They're never faster than
;; the corresponding and/ior/xor operations, so with 32-bit there's
;; no point.  But in 64-bit, we can't hold the relevant immediates
;; within the instruction itself, so operating on bits in the high
;; 32-bits of a register becomes easier.
;;
;; These are slow on Nocona, but fast on Athlon64.  We do require the use
;; of btrq and btcq for corner cases of post-reload expansion of absdf and
;; negdf respectively, so they can never be disabled entirely.

[Bug c++/59916] [4.9 Regression] constructors and destructors can cause control reaches end of non-void function warnings with -Os

2014-01-28 Thread jason at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=59916

Jason Merrill jason at gcc dot gnu.org changed:

   What|Removed |Added

 CC||jason at gcc dot gnu.org

--- Comment #3 from Jason Merrill jason at gcc dot gnu.org ---
(In reply to Richard Biener from comment #2)
   retval = B::B (this, 0, __vtt_parm);

That assigns to the RESULT_DECL, which should count as a return.


[Bug c++/59818] [4.9 regression] Bogus error: call of overloaded .... is ambiguous

2014-01-28 Thread jason at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=59818

Jason Merrill jason at gcc dot gnu.org changed:

   What|Removed |Added

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


[Bug libstdc++/59656] weak_ptr::lock function crashes when compiling with -fno-exceptions flag

2014-01-28 Thread ppluzhnikov at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=59656

--- Comment #11 from ppluzhnikov at gcc dot gnu.org ---
Author: ppluzhnikov
Date: Tue Jan 28 19:08:00 2014
New Revision: 207201

URL: http://gcc.gnu.org/viewcvs?rev=207201root=gccview=rev
Log:
For Google b/12533273 and PR 59656, partially backport r207180 from trunk.

(The new test: libstdc++-v3/testsuite/20_util/shared_ptr/cons/void_neg.cc
is not added, because it succeeds to compile with gcc-4_8.)

Modified:
branches/google/gcc-4_8/libstdc++-v3/include/bits/shared_ptr.h
branches/google/gcc-4_8/libstdc++-v3/include/bits/shared_ptr_base.h
   
branches/google/gcc-4_8/libstdc++-v3/testsuite/20_util/shared_ptr/cons/43820_neg.cc


[Bug middle-end/59261] [4.9 regression] FAIL: gcc.dg/vect/bb-slp-26.c -flto -ffat-lto-objects (internal compiler error)

2014-01-28 Thread law at redhat dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=59261

Jeffrey A. Law law at redhat dot com changed:

   What|Removed |Added

   Priority|P1  |P2
 Status|UNCONFIRMED |NEW
   Last reconfirmed||2014-01-28
 Ever confirmed|0   |1

--- Comment #6 from Jeffrey A. Law law at redhat dot com ---
Thanks.  I've managed to reproduce the failure using those intermediate files. 
However, I haven't managed to trigger the failure directly from source.

What's happening is we're getting into expand_shift_1:

Breakpoint 3, expand_shift_1 (code=LSHIFT_EXPR, mode=V8QImode,
shifted=0x2416e0e0, amount=0x24010410, target=0x0, unsignedp=0)

The amount is (const_int 1)


V8Q8mode isn't a valid shift mode for the ia64 target (mode iterator for the
shifts uses VECINT24).  Since there isn't a pattern for this, no libcall and
the generic bits don't know how to synthesize the shift, we trip the assertion
and die.

We get into this code trying to expand:

mult_expr 0x2414cac8
type vector_type 0x241513b0
type integer_type 0x240e2028 public unsigned QI
size integer_cst 0x24029b80 constant 8
unit size integer_cst 0x24029ba0 constant 1
align 8 symtab 0 alias set 0 canonical type 0x240e2028
precision 8 min integer_cst 0x2402b300 0 max integer_cst
0x2402b320 255
unsigned V8QI
size integer_cst 0x240299c0 constant 64
unit size integer_cst 0x240299e0 constant 8
align 64 symtab 0 alias set -1 canonical type 0x241513b0 nunits
8

arg 0 ssa_name 0x24142178 type vector_type 0x241513b0
visited var var_decl 0x2401dc80 vect__34.18def_stmt
vect__34.18_241 = VIEW_CONVERT_EXPRvector(8) unsigned char(vect__33.17_242);

version 241
arg 1 vector_cst 0x2413e300 type vector_type 0x241513b0
constant
elt0:  integer_cst 0x2402b500 constant 3 elt1:  integer_cst
0x2402b500 3 elt2:  integer_cst 0x2402b500 3 elt3: 
integer_cst 0x2402b500 3 elt4:  integer_cst 0x2402b500 3
elt5:  integer_cst 0x2402b500 3 elt6:  integer_cst
0x2402b500 3 elt7:  integer_cst 0x2402b500 3
../gcc/testsuite/gcc.dg/vect/bb-slp-26.c:19:14


Clearly expanding a V8QImode multiply using a shift is a bad idea on Itanic. 
What I don't see is how to stop the code form using shifts like this.

Regardless, the bug is confirmed, but given it's Itanic, it's certainly not
worthy of P1 status.


[Bug fortran/59414] [4.8/4.9 Regression] [OOP] ICE in in gfc_conv_expr_descriptor on ALLOCATE inside SELECT TYPE

2014-01-28 Thread pault at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=59414

--- Comment #16 from Paul Thomas pault at gcc dot gnu.org ---
Author: pault
Date: Tue Jan 28 20:10:22 2014
New Revision: 207204

URL: http://gcc.gnu.org/viewcvs?rev=207204root=gccview=rev
Log:
2014-01-28  Paul Thomas  pa...@gcc.gnu.org

PR fortran/59414
* trans-stmt.c (gfc_trans_allocate): Before the pointer
assignment to transfer the source _vptr to a class allocate
expression, the final class reference should be exposed. The
tail that includes the _data and array references is stored.
This reduced expression is transferred to 'lhs' and the _vptr
added. Then the tail is restored to the allocate expression.

2014-01-28  Paul Thomas  pa...@gcc.gnu.org

PR fortran/59414
* gfortran.dg/allocate_class_3.f90 : New test

Added:
trunk/gcc/testsuite/gfortran.dg/allocate_class_3.f90
trunk/gcc/testsuite/gfortran.dg/elemental_by_value_1.f90
Modified:
trunk/gcc/fortran/ChangeLog
trunk/gcc/fortran/trans-stmt.c
trunk/gcc/testsuite/ChangeLog


[Bug fortran/59414] [4.8 Regression] [OOP] ICE in in gfc_conv_expr_descriptor on ALLOCATE inside SELECT TYPE

2014-01-28 Thread pault at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=59414

Paul Thomas pault at gcc dot gnu.org changed:

   What|Removed |Added

Summary|[4.8/4.9 Regression] [OOP]  |[4.8 Regression] [OOP] ICE
   |ICE in in   |in in
   |gfc_conv_expr_descriptor on |gfc_conv_expr_descriptor on
   |ALLOCATE inside SELECT TYPE |ALLOCATE inside SELECT TYPE

--- Comment #17 from Paul Thomas pault at gcc dot gnu.org ---
(In reply to Paul Thomas from comment #16)
 Author: pault
 Date: Tue Jan 28 20:10:22 2014
 New Revision: 207204
...snip...
 trunk/gcc/testsuite/gfortran.dg/elemental_by_value_1.f90

This was accidental and was removed in r207205.  Sorry about the noise.

Paul


[Bug c++/58632] [4.8/4.9 Regression] ICE reusing template parameter name as class name

2014-01-28 Thread jason at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=58632

--- Comment #3 from Jason Merrill jason at gcc dot gnu.org ---
Author: jason
Date: Tue Jan 28 21:04:29 2014
New Revision: 207208

URL: http://gcc.gnu.org/viewcvs?rev=207208root=gccview=rev
Log:
PR c++/58632
* decl.c (lookup_and_check_tag): Ignore template parameters if
scope == ts_current.
* pt.c (check_template_shadow): Don't complain about the injected
class name.

Added:
trunk/gcc/testsuite/g++.dg/template/shadow1.C
Modified:
trunk/gcc/cp/ChangeLog
trunk/gcc/cp/decl.c
trunk/gcc/cp/pt.c


[Bug c++/58701] [4.9 Regression] [c++11] ICE initializing member of static union

2014-01-28 Thread jason at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=58701

--- Comment #8 from Jason Merrill jason at gcc dot gnu.org ---
Author: jason
Date: Tue Jan 28 21:04:44 2014
New Revision: 207209

URL: http://gcc.gnu.org/viewcvs?rev=207209root=gccview=rev
Log:
PR c++/58701
* semantics.c (build_anon_member_initialization): Stop walking
when we run out of COMPONENT_REFs.

Added:
trunk/gcc/testsuite/g++.dg/cpp0x/nsdmi-union5.C
Modified:
trunk/gcc/cp/ChangeLog
trunk/gcc/cp/semantics.c


[Bug middle-end/59970] New: Bogus warnings at low optimization levels

2014-01-28 Thread tschwinge at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=59970

Bug ID: 59970
   Summary: Bogus warnings at low optimization levels
   Product: gcc
   Version: unknown
Status: UNCONFIRMED
  Severity: minor
  Priority: P3
 Component: middle-end
  Assignee: tschwinge at gcc dot gnu.org
  Reporter: tschwinge at gcc dot gnu.org
 Build: x86_64-linux-gnu

Created attachment 31970
  -- http://gcc.gnu.org/bugzilla/attachment.cgi?id=31970action=edit
cp-demangle.c

The attached code is greatly reduced from libiberty/cp-demangle.c.  As
discussed in
http://news.gmane.org/find-root.php?message_id=%3C87bnyw41hf.fsf%40kepler.schwinge.homeip.net%3E,
with trunk r207200, it exhibits the following behavior:

$ for t in '' -DTOGGLE1; do for a in '' -DABORT; do for o in -O0 -Og -O1
-O2 -O3 -Ofast; do (set -x  gcc/xgcc -Bgcc/ -Wall -Wextra -c
../../cp-demangle.c $t $a $o); done; done; done
+ gcc/xgcc -Bgcc/ -Wall -Wextra -c ../../cp-demangle.c -O0
+ gcc/xgcc -Bgcc/ -Wall -Wextra -c ../../cp-demangle.c -Og
../../cp-demangle.c: In function 'd_demangle_callback':
../../cp-demangle.c:40:3: warning: 'dc' may be used uninitialized in this
function [-Wmaybe-uninitialized]
   return dc;
   ^
+ gcc/xgcc -Bgcc/ -Wall -Wextra -c ../../cp-demangle.c -O1
+ gcc/xgcc -Bgcc/ -Wall -Wextra -c ../../cp-demangle.c -O2
+ gcc/xgcc -Bgcc/ -Wall -Wextra -c ../../cp-demangle.c -O3
+ gcc/xgcc -Bgcc/ -Wall -Wextra -c ../../cp-demangle.c -Ofast
+ gcc/xgcc -Bgcc/ -Wall -Wextra -c ../../cp-demangle.c -DABORT -O0
+ gcc/xgcc -Bgcc/ -Wall -Wextra -c ../../cp-demangle.c -DABORT -Og
+ gcc/xgcc -Bgcc/ -Wall -Wextra -c ../../cp-demangle.c -DABORT -O1
+ gcc/xgcc -Bgcc/ -Wall -Wextra -c ../../cp-demangle.c -DABORT -O2
+ gcc/xgcc -Bgcc/ -Wall -Wextra -c ../../cp-demangle.c -DABORT -O3
+ gcc/xgcc -Bgcc/ -Wall -Wextra -c ../../cp-demangle.c -DABORT -Ofast
+ gcc/xgcc -Bgcc/ -Wall -Wextra -c ../../cp-demangle.c -DTOGGLE1 -O0
+ gcc/xgcc -Bgcc/ -Wall -Wextra -c ../../cp-demangle.c -DTOGGLE1 -Og
../../cp-demangle.c: In function 'd_demangle_callback':
../../cp-demangle.c:40:3: warning: 'dc' may be used uninitialized in this
function [-Wmaybe-uninitialized]
   return dc;
   ^
+ gcc/xgcc -Bgcc/ -Wall -Wextra -c ../../cp-demangle.c -DTOGGLE1 -O1
../../cp-demangle.c: In function 'd_demangle_callback':
../../cp-demangle.c:40:3: warning: 'dc' may be used uninitialized in this
function [-Wmaybe-uninitialized]
   return dc;
   ^
+ gcc/xgcc -Bgcc/ -Wall -Wextra -c ../../cp-demangle.c -DTOGGLE1 -O2
+ gcc/xgcc -Bgcc/ -Wall -Wextra -c ../../cp-demangle.c -DTOGGLE1 -O3
+ gcc/xgcc -Bgcc/ -Wall -Wextra -c ../../cp-demangle.c -DTOGGLE1 -Ofast
+ gcc/xgcc -Bgcc/ -Wall -Wextra -c ../../cp-demangle.c -DTOGGLE1 -DABORT
-O0
+ gcc/xgcc -Bgcc/ -Wall -Wextra -c ../../cp-demangle.c -DTOGGLE1 -DABORT
-Og
+ gcc/xgcc -Bgcc/ -Wall -Wextra -c ../../cp-demangle.c -DTOGGLE1 -DABORT
-O1
+ gcc/xgcc -Bgcc/ -Wall -Wextra -c ../../cp-demangle.c -DTOGGLE1 -DABORT
-O2
+ gcc/xgcc -Bgcc/ -Wall -Wextra -c ../../cp-demangle.c -DTOGGLE1 -DABORT
-O3
+ gcc/xgcc -Bgcc/ -Wall -Wextra -c ../../cp-demangle.c -DTOGGLE1 -DABORT
-Ofast

In certain cases, GCC fails to track that all the possible values for enum type
indeed have been covered, and so dc must have been initialized.

It does seem appropriate to me for GCC not to do such tracking at low
optimization levels, but then the uninitialized warning should also be disabled
(which I assume is happening for -O0?) to avoid false positive warnings.

The abort to libiberty/cp-demangle.c has been added in r207200.  The
libgomp/env.c change r203514 looks like another instance of this issue,
http://news.gmane.org/find-root.php?message_id=%3C20131014082733.GF30970%40tucnak.zalov.cz%3E.

I'm assigning this to me, tentatively, low priority, so if someone has any
clues, don't hesititate to take it over.


[Bug c++/58616] [meta-bug] nsdmi

2014-01-28 Thread jason at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=58616

Bug 58616 depends on bug 58701, which changed state.

Bug 58701 Summary: [4.9 Regression] [c++11] ICE initializing member of static 
union
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=58701

   What|Removed |Added

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


[Bug c++/58701] [4.9 Regression] [c++11] ICE initializing member of static union

2014-01-28 Thread jason at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=58701

Jason Merrill jason at gcc dot gnu.org changed:

   What|Removed |Added

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

--- Comment #9 from Jason Merrill jason at gcc dot gnu.org ---
Fixed.


[Bug testsuite/59971] New: multilib_flags is placed with the wrong order

2014-01-28 Thread hjl.tools at gmail dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=59971

Bug ID: 59971
   Summary: multilib_flags is placed with the wrong order
   Product: gcc
   Version: 4.9.0
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: testsuite
  Assignee: unassigned at gcc dot gnu.org
  Reporter: hjl.tools at gmail dot com

Some testcases need explicit GCC options to properly run, like
gcc.target/i386/sse2-init-v2di-2.c has

/* { dg-options -O2 -msse4 -march=core2 -dp } */

-march=core2 is specified explicitly.  But with multlib, we get


[hjl@gnu-18 gcc]$ make check-gcc RUNTESTFLAGS=--target_board='unix{-march=k8}'
i386.exp=sse2-init-v2di-2.c  
make[1]: Entering directory `/export/build/gnu/gcc/build-x86_64-linux/gcc'
test -d plugin || mkdir plugin
test -d testsuite || mkdir testsuite
test -d testsuite/gcc || mkdir testsuite/gcc
(rootme=`${PWDCMD-pwd}`; export rootme; \
srcdir=`cd /export/gnu/import/git/gcc/gcc; ${PWDCMD-pwd}` ; export srcdir ; \
cd testsuite/gcc; \
rm -f tmp-site.exp; \
sed '/set tmpdir/ s|testsuite$|testsuite/gcc|' \
 ../../site.exp  tmp-site.exp; \
/bin/sh ${srcdir}/../move-if-change tmp-site.exp site.exp; \
EXPECT=`if [ -f ${rootme}/../expect/expect ] ; then echo
${rootme}/../expect/expect ; else echo expect ; fi` ; export EXPECT ; \
if [ -f ${rootme}/../expect/expect ] ; then  \
   TCL_LIBRARY=`cd .. ; cd ${srcdir}/../tcl/library ; ${PWDCMD-pwd}` ; \
export TCL_LIBRARY ; fi ; \
runtestflags= ; \
if [ -n  ] ; then \
  runtestflags=; \
elif [ -n  ] ; then \
  parts=`echo '  ' \
  | sed 's/=[^ ]* / /g'`; \
  for part in `find $srcdir/testsuite/gcc* -name \*.exp` ; do \
part=`basename $part` ; \
case  $parts $runtestflags  in \
  * $part *) ;; \
  *) runtestflags=$runtestflags $part ;; \
esac ; \
  done ; \
fi ; \
`if [ -f ${srcdir}/../dejagnu/runtest ] ; then echo
${srcdir}/../dejagnu/runtest ; else echo runtest; fi` --tool gcc
--target_board='unix{-march=k8}' i386.exp=sse2-init-v2di-2.c $runtestflags)
WARNING: Couldn't find the global config file.
Test Run By hjl on Tue Jan 28 12:40:33 2014
Native configuration is x86_64-unknown-linux-gnu

=== gcc tests ===

Schedule of variations:
unix/-march=k8

Running target unix/-march=k8
Using /usr/share/dejagnu/baseboards/unix.exp as board description file for
target.
Using /usr/share/dejagnu/config/unix.exp as generic interface file for target.
Using /export/gnu/import/git/gcc/gcc/testsuite/config/default.exp as
tool-and-target-specific interface file.
Running /export/gnu/import/git/gcc/gcc/testsuite/gcc.target/i386/i386.exp ...
FAIL: gcc.target/i386/sse2-init-v2di-2.c scan-assembler-times vec_concatv2di/3
1

=== gcc Summary ===

# of expected passes11
# of unexpected failures1
/export/build/gnu/gcc/build-x86_64-linux/gcc/xgcc  version 4.9.0 20140128
(experimental) (GCC) 

make[1]: [check-parallel-gcc] Error 1 (ignored)
make[1]: Leaving directory `/export/build/gnu/gcc/build-x86_64-linux/gcc'

The problem is -march=k8 is placed after -march=core2:

[hjl@gnu-18 gcc]$  grep gcc.target/i386/sse2-init-v2di-2.c
testsuite/gcc/gcc.log 
Executing on host: /export/build/gnu/gcc/build-x86_64-linux/gcc/xgcc
-B/export/build/gnu/gcc/build-x86_64-linux/gcc/
/export/gnu/import/git/gcc/gcc/testsuite/gcc.target/i386/sse2-init-v2di-2.c 
-fno-diagnostics-show-caret -fdiagnostics-color=never  -O2 -msse4 -march=core2
-dp -ffat-lto-objects -S  -march=k8 -o sse2-init-v2di-2.s(timeout = 300)
spawn -ignore SIGHUP /export/build/gnu/gcc/build-x86_64-linux/gcc/xgcc
-B/export/build/gnu/gcc/build-x86_64-linux/gcc/
/export/gnu/import/git/gcc/gcc/testsuite/gcc.target/i386/sse2-init-v2di-2.c
-fno-diagnostics-show-caret -fdiagnostics-color=never -O2 -msse4 -march=core2
-dp -ffat-lto-objects -S -march=k8 -o sse2-init-v2di-2.s
PASS: gcc.target/i386/sse2-init-v2di-2.c (test for excess errors)
FAIL: gcc.target/i386/sse2-init-v2di-2.c scan-assembler-times vec_concatv2di/3
1
[hjl@gnu-18 gcc]$ 

It is done by target.exp in dejagnu:

if {[board_info $dest exists multilib_flags]} {
append add_flags  [board_info $dest multilib_flags]
}

It doesn't work well with such gcc testcases.  It works if we change it to

if {[board_info $dest exists multilib_flags]} {
set add_flags [board_info $dest multilib_flags] $add_flags
}


[Bug debug/59575] [4.9 regression] ICE in maybe_record_trace_start, at dwarf2cfi.c:2239

2014-01-28 Thread rmansfield at qnx dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=59575

--- Comment #20 from Ryan Mansfield rmansfield at qnx dot com ---
 Sorry, can't reproduce.  Can you run it in the debugger
 p debug_rtx (p)
 up
 p debug_rtx (insn)
 ?

Sorry for the delay.

Starting program: /home/ryan/gnu/gcc/trunk/arm-eabi/gcc/./cc1 -fexceptions
/home/ryan/conftest.c
 foo
Analyzing compilation unit
Performing interprocedural optimizations
 *free_lang_data visibility early_local_cleanups *free_inline_summary
whole-program inlineAssembling functions:
 foo
Program received signal SIGSEGV, Segmentation fault.
0x00c285e2 in arm_unwind_emit_sequence (asm_out_file=0x165d930, 
p=0x76dd20a0) at ../../gcc/config/arm/arm.c:28728
28728  e = XEXP (SET_DEST (e), 0);
(gdb) p debug_rtx(p)
(sequence [
(set/f (reg/f:SI 13 sp)
(plus:SI (reg/f:SI 13 sp)
(const_int -16 [0xfff0])))
(set/f (mem/c:SI (reg/f:SI 13 sp) [0  S4 A32])
(reg:SI 4 r4))
(set/f (mem/c:SI (plus:SI (reg/f:SI 13 sp)
(const_int 4 [0x4])) [0  S4 A32])
(reg:SI 5 r5))
(set/f (mem/c:SI (plus:SI (reg/f:SI 13 sp)
(const_int 8 [0x8])) [0  S4 A32])
(reg/f:SI 11 fp))
(set/f (mem/c:SI (plus:SI (reg/f:SI 13 sp)
(const_int 12 [0xc])) [0  S4 A32])
(reg:SI 14 lr))
(nil)
(nil)
(nil)
(nil)
(nil)
(nil)
(nil)
(nil)
(nil)
(nil)
(nil)
(nil)
(nil)
(nil)
(nil)
(nil)
(nil)
(nil)
(nil)
(nil)
(nil)
(nil)
(nil)
(nil)
(nil)
(nil)
(nil)
(nil)
(nil)
(nil)
(nil)
(nil)
(nil)
(nil)
(nil)
(nil)
(nil)
(nil)
(nil)
(nil)
])
$2 = void
(gdb) up
#1  0x00c2905e in arm_unwind_emit (asm_out_file=0x165d930, 
insn=0x76dd31f8) at ../../gcc/config/arm/arm.c:28969
28969  arm_unwind_emit_sequence (asm_out_file, pat);
(gdb) p debug_rtx(insn)
(insn/f 65 3 66 (parallel [
(set (mem/c:BLK (pre_modify:SI (reg/f:SI 13 sp)
(plus:SI (reg/f:SI 13 sp)
(const_int -16 [0xfff0]))) [0  A8])
(unspec:BLK [
(reg:SI 4 r4)
] UNSPEC_PUSH_MULT))
(use (reg:SI 5 r5))
(use (reg/f:SI 11 fp))
(use (reg:SI 14 lr))
]) /home/ryan/conftest.c:4 341 {*push_multi}
 (expr_list:REG_FRAME_RELATED_EXPR (sequence [
(set/f (reg/f:SI 13 sp)
(plus:SI (reg/f:SI 13 sp)
(const_int -16 [0xfff0])))
(set/f (mem/c:SI (reg/f:SI 13 sp) [0  S4 A32])
(reg:SI 4 r4))
(set/f (mem/c:SI (plus:SI (reg/f:SI 13 sp)
(const_int 4 [0x4])) [0  S4 A32])
(reg:SI 5 r5))
(set/f (mem/c:SI (plus:SI (reg/f:SI 13 sp)
(const_int 8 [0x8])) [0  S4 A32])
(reg/f:SI 11 fp))
(set/f (mem/c:SI (plus:SI (reg/f:SI 13 sp)
(const_int 12 [0xc])) [0  S4 A32])
(reg:SI 14 lr))
(nil)
(nil)
(nil)
(nil)
(nil)
(nil)
(nil)
(nil)
(nil)
(nil)
(nil)
(nil)
(nil)
(nil)
(nil)
(nil)
(nil)
(nil)
(nil)
(nil)
(nil)
(nil)
(nil)
(nil)
(nil)
(nil)
(nil)
(nil)
(nil)
(nil)
(nil)
(nil)
(nil)
(nil)
(nil)
(nil)
(nil)
(nil)
(nil)
(nil)
])
(nil)))
$3 = void


[Bug tree-optimization/59970] Bogus warnings at low optimization levels

2014-01-28 Thread pinskia at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=59970

Andrew Pinski pinskia at gcc dot gnu.org changed:

   What|Removed |Added

  Component|middle-end  |tree-optimization

--- Comment #1 from Andrew Pinski pinskia at gcc dot gnu.org ---
I don't think this is a GCC bug except for the unitialized predicates is not
working.  The reason why it fails for -Og is because jump threading is disabled
as you want to be able to step through the code.  -O1 must not decided jump
threading is profitable either.

For the unitialized predicates issue, it might be because switch statements are
not handled.


[Bug c++/58632] [4.8/4.9 Regression] ICE reusing template parameter name as class name

2014-01-28 Thread jason at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=58632

--- Comment #5 from Jason Merrill jason at gcc dot gnu.org ---
Author: jason
Date: Tue Jan 28 21:33:55 2014
New Revision: 207213

URL: http://gcc.gnu.org/viewcvs?rev=207213root=gccview=rev
Log:
PR c++/58632
* decl.c (lookup_and_check_tag): Ignore template parameters if
scope == ts_current.
* pt.c (check_template_shadow): Don't complain about the injected
class name.

Added:
branches/gcc-4_8-branch/gcc/testsuite/g++.dg/template/shadow1.C
Modified:
branches/gcc-4_8-branch/gcc/cp/ChangeLog
branches/gcc-4_8-branch/gcc/cp/decl.c
branches/gcc-4_8-branch/gcc/cp/pt.c


[Bug c++/58632] [4.8/4.9 Regression] ICE reusing template parameter name as class name

2014-01-28 Thread jason at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=58632

Jason Merrill jason at gcc dot gnu.org changed:

   What|Removed |Added

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

--- Comment #4 from Jason Merrill jason at gcc dot gnu.org ---
Fixed for 4.8.3/4.9.


[Bug tree-optimization/59932] spurious undefined behavior warning on valid code

2014-01-28 Thread jakub at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=59932

--- Comment #7 from Jakub Jelinek jakub at gcc dot gnu.org ---
(In reply to Zhendong Su from comment #6)
 Thanks for your explanation Jakub. It's more clear now, but I still don't
 fully understand the difference in behavior from 4.8 to the current trunk. 
 
 Is it because 4.8's support for warning undefined behaviors is weaker than
 4.9's, and with that enhanced support, 4.9 sometimes gives false warnings
 like the one reported here?

4.8 only warned about this in later passes when the loops have been already
constructed and preserved, so it wouldn't warn e.g. if it was cunrolli (as in
this case) that found the undefined behavior.  GCC 4.9 creates loops
immediately after cfg is created and the warning is thus enabled much earlier. 
This means we warn in more cases when it is desirable to warn, but as this
testcase shows also sometimes means there can be false positives.  The loop
with the undefined behavior is there for many passes, from cunrolli where it
warns another 20 passes until dom1 is able to find out the code is dead.


[Bug c++/59818] [4.9 regression] Bogus error: call of overloaded .... is ambiguous

2014-01-28 Thread jason at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=59818

--- Comment #3 from Jason Merrill jason at gcc dot gnu.org ---
Author: jason
Date: Tue Jan 28 22:00:05 2014
New Revision: 207215

URL: http://gcc.gnu.org/viewcvs?rev=207215root=gccview=rev
Log:
PR c++/59818
* pt.c (tsubst_function_type): Make sure we keep the same function
quals.

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


[Bug middle-end/55500] [devirt] trunk fails inline-devirt test #7

2014-01-28 Thread matt at use dot net
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=55500

--- Comment #4 from Matt Hargett matt at use dot net ---
Phillip, the problem is not that the program doesn't run properly. It's that
the code isn't inline via de-virtualization when it could be. The main() should
contain a few printf/puts calls and nothing more.


[Bug target/59968] Unused BT patterns

2014-01-28 Thread hjl.tools at gmail dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=59968

--- Comment #15 from H.J. Lu hjl.tools at gmail dot com ---
(In reply to Uroš Bizjak from comment #14)
 From i386.md:
 
 ;; %%% bts, btr, btc, bt.
 ;; In general these instructions are *slow* when applied to memory,
 ;; since they enforce atomic operation.  When applied to registers,
 ;; it depends on the cpu implementation.  They're never faster than
 ;; the corresponding and/ior/xor operations, so with 32-bit there's
 ;; no point.  But in 64-bit, we can't hold the relevant immediates
 ;; within the instruction itself, so operating on bits in the high
 ;; 32-bits of a register becomes easier.
 ;;

BTx with memory operand are slow, but they have smaller code
sizes.  We can optimize well for register operand as the first
step.

  1   2   >