[Bug target/53853] FAIL: g++.dg/other/pr53811.C -std=gnu++* (internal compiler error)

2012-07-06 Thread ubizjak at gmail dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=53853

--- Comment #5 from Uros Bizjak  2012-07-06 07:45:21 
UTC ---
We can leave all the magic to legitimize_pic_address, so following alternative
patch is much clearer:

--cut here--
Index: i386.c
===
--- i386.c  (revision 189310)
+++ i386.c  (working copy)
@@ -33057,6 +33057,10 @@ x86_output_mi_thunk (FILE *file,
 emit_jump_insn (gen_indirect_jump (fnaddr));
   else
 {
+  if (flag_pic && SYMBOLIC_CONST (fnaddr))
+   fnaddr = legitimize_pic_address (fnaddr,
+gen_rtx_REG (Pmode, tmp_regno));
+
   if (!sibcall_insn_operand (fnaddr, word_mode))
{
  tmp = gen_rtx_REG (word_mode, tmp_regno);
--cut here--

With this patch, we get:

.size   _ZN1D4foo2Ev, .-_ZN1D4foo2Ev
.set.LTHUNK0,_ZN1D4foo2Ev
.p2align 4,,15
.globl  _ZThn16_N1D4foo2Ev
.type   _ZThn16_N1D4foo2Ev, @function
_ZThn16_N1D4foo2Ev:
.LFB15:
.cfi_startproc
subq$16, %rdi
movabsq $.LTHUNK0@GOTOFF, %r10
addq%rbx, %r10
jmp *%r10
.cfi_endproc
.LFE15:
.size   _ZThn16_N1D4foo2Ev, .-_ZThn16_N1D4foo2Ev

So, load off GOTOFF table, which works as well.


[Bug rtl-optimization/53827] [4.8 Regression][alpha]: Invalid insn scheduling in sched1 pass

2012-07-06 Thread ubizjak at gmail dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=53827

--- Comment #4 from Uros Bizjak  2012-07-06 07:55:59 
UTC ---
Alexandre, can you please commit the patch from Comment 2? I have bootstrapped
and regression tested it on alphaev68-pc-linux-gnu (an AND target) without
problems.


[Bug tree-optimization/53870] Redundant memory load

2012-07-06 Thread pinskia at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=53870

Andrew Pinski  changed:

   What|Removed |Added

   Keywords||missed-optimization
 Status|UNCONFIRMED |NEW
   Last reconfirmed||2012-07-06
 Ever Confirmed|0   |1
   Severity|minor   |enhancement

--- Comment #2 from Andrew Pinski  2012-07-06 
08:11:10 UTC ---
Simpler testcase:
int f(int *a, int *b)
{
  *a = *b;
  return *b;
}


Related to PR 23094.


[Bug c++/53868] Temporary for indirect binding is not destroyed when destructor from initializer temp throws

2012-07-06 Thread redi at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=53868

--- Comment #1 from Jonathan Wakely  2012-07-06 
08:17:16 UTC ---
(It doesn't matter for 4.7 but you need noexcept(false) on Q::~Q to use the
testcase on trunk)


[Bug c++/53858] [4.8 Regression] [C++11] template aliases used in template parameters default expression

2012-07-06 Thread redi at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=53858

Jonathan Wakely  changed:

   What|Removed |Added

   Keywords||rejects-valid
Summary|template aliases used in|[4.8 Regression] [C++11]
   |template parameters default |template aliases used in
   |expression  |template parameters default
   ||expression

--- Comment #1 from Jonathan Wakely  2012-07-06 
08:18:48 UTC ---
confirmed


[Bug middle-end/52621] [4.6/4.7 Regression] ICE with -O3 -march=opteron in initialize_matrix_A, at tree-data-ref.c:1964

2012-07-06 Thread rguenth at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=52621

--- Comment #14 from Richard Guenther  2012-07-06 
09:20:25 UTC ---
Author: rguenth
Date: Fri Jul  6 09:20:19 2012
New Revision: 189312

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=189312
Log:
2012-07-06  Richard Guenther  

Backport from mainline
2012-04-11  Richard Guenther  

PR middle-end/52621
* tree-chrec.c (evolution_function_is_invariant_rec_p): Properly
consider loop nesting.
(evolution_function_is_univariate_p): Properly check the remainder
for chrecs.

* gfortran.dg/pr52621.f90: New testcase.

Added:
branches/gcc-4_7-branch/gcc/testsuite/gfortran.dg/pr52621.f90
Modified:
branches/gcc-4_7-branch/gcc/ChangeLog
branches/gcc-4_7-branch/gcc/testsuite/ChangeLog
branches/gcc-4_7-branch/gcc/tree-chrec.c


[Bug tree-optimization/53693] [4.7 regression] ICE in vect_get_vec_def_for_stmt_copy, at tree-vect-stmts.c:1438

2012-07-06 Thread rguenth at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=53693

--- Comment #7 from Richard Guenther  2012-07-06 
09:21:39 UTC ---
Author: rguenth
Date: Fri Jul  6 09:21:36 2012
New Revision: 189313

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=189313
Log:
2012-07-06  Richard Guenther  

Backport from mainline
2012-06-18  Richard Guenther  

PR tree-optimization/53693
* tree-vect-patterns.c (vect_operation_fits_smaller_type):
Reject operands with more than one use.

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

Added:
branches/gcc-4_7-branch/gcc/testsuite/g++.dg/torture/pr53693.C
Modified:
branches/gcc-4_7-branch/gcc/ChangeLog
branches/gcc-4_7-branch/gcc/testsuite/ChangeLog
branches/gcc-4_7-branch/gcc/tree-vect-patterns.c


[Bug other/52786] double-int.c:231:31: error: comparison between signed and unsigned

2012-07-06 Thread rguenth at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=52786

--- Comment #3 from Richard Guenther  2012-07-06 
09:25:50 UTC ---
Author: rguenth
Date: Fri Jul  6 09:25:46 2012
New Revision: 189314

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=189314
Log:
2012-07-06  Richard Guenther  

Backport from mainline
2012-03-30  Richard Guenther  

PR middle-end/52786
* double-int.c (rshift_double): Remove not
needed cast.

2012-03-28  Richard Guenther  

PR middle-end/50708
* double-int.h (rshift_double): Remove.
* double-int.c (lshift_double): Use absu_hwi to make count
positive.
(rshift_double): Make static, take unsigned count argument,
remove handling of negative count argument.
(double_int_rshift): Dispatch to lshift_double.

Modified:
branches/gcc-4_7-branch/gcc/ChangeLog
branches/gcc-4_7-branch/gcc/double-int.c
branches/gcc-4_7-branch/gcc/double-int.h


[Bug middle-end/50708] Infinite loop between rshift_double and lshift_double if count is LONG_MIN

2012-07-06 Thread rguenth at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=50708

--- Comment #11 from Richard Guenther  2012-07-06 
09:25:51 UTC ---
Author: rguenth
Date: Fri Jul  6 09:25:46 2012
New Revision: 189314

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=189314
Log:
2012-07-06  Richard Guenther  

Backport from mainline
2012-03-30  Richard Guenther  

PR middle-end/52786
* double-int.c (rshift_double): Remove not
needed cast.

2012-03-28  Richard Guenther  

PR middle-end/50708
* double-int.h (rshift_double): Remove.
* double-int.c (lshift_double): Use absu_hwi to make count
positive.
(rshift_double): Make static, take unsigned count argument,
remove handling of negative count argument.
(double_int_rshift): Dispatch to lshift_double.

Modified:
branches/gcc-4_7-branch/gcc/ChangeLog
branches/gcc-4_7-branch/gcc/double-int.c
branches/gcc-4_7-branch/gcc/double-int.h


[Bug tree-optimization/53693] [4.7 regression] ICE in vect_get_vec_def_for_stmt_copy, at tree-vect-stmts.c:1438

2012-07-06 Thread rguenth at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=53693

Richard Guenther  changed:

   What|Removed |Added

 Status|ASSIGNED|RESOLVED
 Resolution||FIXED

--- Comment #8 from Richard Guenther  2012-07-06 
09:26:10 UTC ---
Fixed.


[Bug middle-end/52621] [4.6 Regression] ICE with -O3 -march=opteron in initialize_matrix_A, at tree-data-ref.c:1964

2012-07-06 Thread rguenth at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=52621

Richard Guenther  changed:

   What|Removed |Added

  Known to work||4.7.2
Summary|[4.6/4.7 Regression] ICE|[4.6 Regression] ICE with
   |with -O3 -march=opteron in  |-O3 -march=opteron in
   |initialize_matrix_A, at |initialize_matrix_A, at
   |tree-data-ref.c:1964|tree-data-ref.c:1964
  Known to fail|4.6.1, 4.7.0|4.6.3, 4.7.1

--- Comment #15 from Richard Guenther  2012-07-06 
09:27:02 UTC ---
And for 4.7.2.


[Bug middle-end/50708] Infinite loop between rshift_double and lshift_double if count is LONG_MIN

2012-07-06 Thread rguenth at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=50708

Richard Guenther  changed:

   What|Removed |Added

  Known to work||4.7.2
   Target Milestone|4.8.0   |4.7.2
  Known to fail||4.7.1

--- Comment #12 from Richard Guenther  2012-07-06 
09:27:34 UTC ---
4.7.2 even.



[Bug tree-optimization/53870] Redundant memory load

2012-07-06 Thread rguenth at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=53870

Richard Guenther  changed:

   What|Removed |Added

 Status|NEW |RESOLVED
 Resolution||DUPLICATE

--- Comment #3 from Richard Guenther  2012-07-06 
09:59:28 UTC ---
It's a dup.

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


[Bug tree-optimization/23094] store ccp, or store copy prop misses an optimization

2012-07-06 Thread rguenth at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=23094

Richard Guenther  changed:

   What|Removed |Added

 CC||unixoid2003 at mail dot ru

--- Comment #14 from Richard Guenther  2012-07-06 
09:59:28 UTC ---
*** Bug 53870 has been marked as a duplicate of this bug. ***


[Bug target/53811] ICE: in insn_default_length, at config/i386/i386.md:529 (unrecognizable insn) with -mcmodel=large

2012-07-06 Thread uros at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=53811

--- Comment #8 from uros at gcc dot gnu.org 2012-07-06 10:00:20 UTC ---
Author: uros
Date: Fri Jul  6 10:00:11 2012
New Revision: 189315

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=189315
Log:
PR target/53811
* config/i386/i386.c (x86_output_mi_thunk): For CM_LARGE_PIC model,
emit PIC sequence for fnaddr symbol reference in advance.


Modified:
trunk/gcc/ChangeLog
trunk/gcc/config/i386/i386.c


[Bug target/53853] FAIL: g++.dg/other/pr53811.C -std=gnu++* (internal compiler error)

2012-07-06 Thread ubizjak at gmail dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=53853

Uros Bizjak  changed:

   What|Removed |Added

   Target Milestone|--- |4.7.2

--- Comment #6 from Uros Bizjak  2012-07-06 10:02:38 
UTC ---
Author: uros
Date: Fri Jul  6 10:00:11 2012
New Revision: 189315

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=189315
Log:
PR target/53853
* config/i386/i386.c (x86_output_mi_thunk): For CM_LARGE_PIC model,
emit PIC sequence for fnaddr symbol reference in advance.


Modified:
trunk/gcc/ChangeLog
trunk/gcc/config/i386/i386.c


[Bug c/53871] New: Please warn about endless loops if they are obvious

2012-07-06 Thread tim.ruehsen at gmx dot de
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=53871

 Bug #: 53871
   Summary: Please warn about endless loops if they are obvious
Classification: Unclassified
   Product: gcc
   Version: 4.7.1
Status: UNCONFIRMED
  Severity: enhancement
  Priority: P3
 Component: c
AssignedTo: unassig...@gcc.gnu.org
ReportedBy: tim.rueh...@gmx.de


Obvious endless loops could be reported, e.g. if the loop condition doesn't
change and the loop can't be left otherwise.

Example:
// x is declared non-volatile
while (x!=0);

while (x!=0) {
  a++;
}

An optional -Wendless-loop could detect such issues with all kind of loops.

splint 3.1.2 says about the above axamples:

Suspected infinite loop.  No value used in loop test (a) is modified by test or
loop body.
  This appears to be an infinite loop. Nothing in the body of the loop or the
  loop test modifies the value of the loop test. Perhaps the specification of a
  function called in the loop body is missing a modification. (Use -infloops to
  inhibit warning)


[Bug tree-optimization/23094] store ccp, or store copy prop misses an optimization

2012-07-06 Thread rguenth at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=23094

--- Comment #15 from Richard Guenther  2012-07-06 
10:06:08 UTC ---
Testcase from PR53870:

int f(int *a, int *b)
{
  *a = *b;
  return *b;
}


[Bug tree-optimization/52009] Another missed tail merging opportunity

2012-07-06 Thread vries at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=52009

--- Comment #5 from vries at gcc dot gnu.org 2012-07-06 11:07:36 UTC ---
Author: vries
Date: Fri Jul  6 11:07:32 2012
New Revision: 189321

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=189321
Log:
2012-07-06  Tom de Vries  

PR tree-optimization/52009
* tree-ssa-tail-merge.c (gimple_equal_p): For GIMPLE_ASSIGN, compare
value numbers of gimple_vdef.
* tree-ssa-sccvn.h (vn_reference_insert): Add vdef parameter to
prototype.
* tree-ssa-sccvn.c (copy_reference_ops_from_ref): Handle MODIFY_EXPR.
(vn_reference_insert): Add and handle vdef parameter.
(visit_reference_op_load): Add argument to vn_reference_insert call.
(visit_reference_op_store): Find value number of vdef of store.  Insert
value number of vdef of store.

Modified:
trunk/gcc/ChangeLog
trunk/gcc/tree-ssa-sccvn.c
trunk/gcc/tree-ssa-sccvn.h
trunk/gcc/tree-ssa-tail-merge.c


[Bug tree-optimization/52009] Another missed tail merging opportunity

2012-07-06 Thread vries at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=52009

--- Comment #6 from vries at gcc dot gnu.org 2012-07-06 11:07:41 UTC ---
Author: vries
Date: Fri Jul  6 11:07:37 2012
New Revision: 189322

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=189322
Log:
2012-07-06  Tom de Vries  

PR tree-optimization/52009
* gcc.dg/pr51879-7.c: New test.
* gcc.dg/pr51879-18.c: New test.

Added:
trunk/gcc/testsuite/gcc.dg/pr51879-18.c
trunk/gcc/testsuite/gcc.dg/pr51879-7.c
Modified:
trunk/gcc/testsuite/ChangeLog


[Bug tree-optimization/52009] Another missed tail merging opportunity

2012-07-06 Thread vries at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=52009

--- Comment #5 from vries at gcc dot gnu.org 2012-07-06 11:07:36 UTC ---
Author: vries
Date: Fri Jul  6 11:07:32 2012
New Revision: 189321

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=189321
Log:
2012-07-06  Tom de Vries  

PR tree-optimization/52009
* tree-ssa-tail-merge.c (gimple_equal_p): For GIMPLE_ASSIGN, compare
value numbers of gimple_vdef.
* tree-ssa-sccvn.h (vn_reference_insert): Add vdef parameter to
prototype.
* tree-ssa-sccvn.c (copy_reference_ops_from_ref): Handle MODIFY_EXPR.
(vn_reference_insert): Add and handle vdef parameter.
(visit_reference_op_load): Add argument to vn_reference_insert call.
(visit_reference_op_store): Find value number of vdef of store.  Insert
value number of vdef of store.

Modified:
trunk/gcc/ChangeLog
trunk/gcc/tree-ssa-sccvn.c
trunk/gcc/tree-ssa-sccvn.h
trunk/gcc/tree-ssa-tail-merge.c

--- Comment #6 from vries at gcc dot gnu.org 2012-07-06 11:07:41 UTC ---
Author: vries
Date: Fri Jul  6 11:07:37 2012
New Revision: 189322

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=189322
Log:
2012-07-06  Tom de Vries  

PR tree-optimization/52009
* gcc.dg/pr51879-7.c: New test.
* gcc.dg/pr51879-18.c: New test.

Added:
trunk/gcc/testsuite/gcc.dg/pr51879-18.c
trunk/gcc/testsuite/gcc.dg/pr51879-7.c
Modified:
trunk/gcc/testsuite/ChangeLog


[Bug tree-optimization/52009] Another missed tail merging opportunity

2012-07-06 Thread vries at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=52009

vries at gcc dot gnu.org changed:

   What|Removed |Added

 Status|NEW |RESOLVED
 Resolution||FIXED
 AssignedTo|unassigned at gcc dot   |vries at gcc dot gnu.org
   |gnu.org |

--- Comment #7 from vries at gcc dot gnu.org 2012-07-06 11:09:59 UTC ---
patch and test-cases checked in, closing bug.


[Bug tree-optimization/51879] Missed tail merging with non-const/pure calls

2012-07-06 Thread vries at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=51879

--- Comment #12 from vries at gcc dot gnu.org 2012-07-06 11:22:10 UTC ---
Author: vries
Date: Fri Jul  6 11:22:06 2012
New Revision: 189323

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=189323
Log:
2012-07-06  Tom de Vries  

PR tree-optimization/51879
* tree-ssa-sccvn.c (copy_reference_ops_from_call)
(visit_reference_op_call): Handle case that lhs is not an SSA_NAME.
(visit_use): Also call visit_reference_op_call for calls with a vdef.

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


[Bug tree-optimization/51879] Missed tail merging with non-const/pure calls

2012-07-06 Thread vries at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=51879

--- Comment #12 from vries at gcc dot gnu.org 2012-07-06 11:22:10 UTC ---
Author: vries
Date: Fri Jul  6 11:22:06 2012
New Revision: 189323

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=189323
Log:
2012-07-06  Tom de Vries  

PR tree-optimization/51879
* tree-ssa-sccvn.c (copy_reference_ops_from_call)
(visit_reference_op_call): Handle case that lhs is not an SSA_NAME.
(visit_use): Also call visit_reference_op_call for calls with a vdef.

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

--- Comment #13 from vries at gcc dot gnu.org 2012-07-06 11:22:15 UTC ---
Author: vries
Date: Fri Jul  6 11:22:12 2012
New Revision: 189324

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=189324
Log:
2012-07-06  Tom de Vries  

PR tree-optimization/51879
* gcc.dg/pr51879-16.c: New test.
* gcc.dg/pr51879-17.c: Same.

Added:
trunk/gcc/testsuite/gcc.dg/pr51879-16.c
trunk/gcc/testsuite/gcc.dg/pr51879-17.c
Modified:
trunk/gcc/testsuite/ChangeLog


[Bug tree-optimization/51879] Missed tail merging with non-const/pure calls

2012-07-06 Thread vries at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=51879

--- Comment #13 from vries at gcc dot gnu.org 2012-07-06 11:22:15 UTC ---
Author: vries
Date: Fri Jul  6 11:22:12 2012
New Revision: 189324

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=189324
Log:
2012-07-06  Tom de Vries  

PR tree-optimization/51879
* gcc.dg/pr51879-16.c: New test.
* gcc.dg/pr51879-17.c: Same.

Added:
trunk/gcc/testsuite/gcc.dg/pr51879-16.c
trunk/gcc/testsuite/gcc.dg/pr51879-17.c
Modified:
trunk/gcc/testsuite/ChangeLog


[Bug tree-optimization/51879] Missed tail merging with non-const/pure calls

2012-07-06 Thread vries at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=51879

vries at gcc dot gnu.org changed:

   What|Removed |Added

   Keywords||missed-optimization
 Status|ASSIGNED|RESOLVED
 Resolution||FIXED

--- Comment #14 from vries at gcc dot gnu.org 2012-07-06 11:31:33 UTC ---
follow-up patch and test-cases checked in, closing bug.


[Bug rtl-optimization/53827] [4.8 Regression][alpha]: Invalid insn scheduling in sched1 pass

2012-07-06 Thread aoliva at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=53827

--- Comment #5 from Alexandre Oliva  2012-07-06 
11:37:17 UTC ---
Author: aoliva
Date: Fri Jul  6 11:37:14 2012
New Revision: 189325

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=189325
Log:
PR rtl-optimization/53827
PR debug/53671
PR debug/49888
* alias.c (memrefs_conflict_p): Adjust offset and size by the
same amount for alignment ANDs.

Modified:
trunk/gcc/ChangeLog
trunk/gcc/alias.c


[Bug debug/49888] VTA: -O2 -g variable value changes, it does not change in the source

2012-07-06 Thread aoliva at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=49888

--- Comment #10 from Alexandre Oliva  2012-07-06 
11:37:19 UTC ---
Author: aoliva
Date: Fri Jul  6 11:37:14 2012
New Revision: 189325

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=189325
Log:
PR rtl-optimization/53827
PR debug/53671
PR debug/49888
* alias.c (memrefs_conflict_p): Adjust offset and size by the
same amount for alignment ANDs.

Modified:
trunk/gcc/ChangeLog
trunk/gcc/alias.c


[Bug debug/53671] [4.8 Regression] Many guality test failures

2012-07-06 Thread aoliva at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=53671

--- Comment #10 from Alexandre Oliva  2012-07-06 
11:37:19 UTC ---
Author: aoliva
Date: Fri Jul  6 11:37:14 2012
New Revision: 189325

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=189325
Log:
PR rtl-optimization/53827
PR debug/53671
PR debug/49888
* alias.c (memrefs_conflict_p): Adjust offset and size by the
same amount for alignment ANDs.

Modified:
trunk/gcc/ChangeLog
trunk/gcc/alias.c


[Bug debug/53820] [4.8 Regression] ICE in vt_expand_var_loc_chain, at var-tracking.c:8029

2012-07-06 Thread aoliva at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=53820

--- Comment #5 from Alexandre Oliva  2012-07-06 
11:37:40 UTC ---
Author: aoliva
Date: Fri Jul  6 11:37:36 2012
New Revision: 189326

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=189326
Log:
PR debug/53820
* var-tracking.c (vt_add_function_parameter): Convert
internal_arg_pointer into arg_pointer-based address even
without DRAP.

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


[Bug libstdc++/53872] New: [C++11] ADL bug in std::thread

2012-07-06 Thread frankhb1989 at gmail dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=53872

 Bug #: 53872
   Summary: [C++11] ADL bug in std::thread
Classification: Unclassified
   Product: gcc
   Version: 4.7.1
Status: UNCONFIRMED
  Severity: minor
  Priority: P3
 Component: libstdc++
AssignedTo: unassig...@gcc.gnu.org
ReportedBy: frankhb1...@gmail.com


Code below fails to compile using mingw-g++4.7.1 from
sourceforge.net/projects/mingwbuilds:

#include 
#include 
#include 

template
void make_shared(P&&...)
{}

struct C{}; // enable ADL

void f(C){}

int main()
{
std::thread t(std::bind(&::f, C())); //error
}

Messages:

d:\mingw\bin\..\lib\gcc\i686-w64-mingw32\4.7.1\include\c++\thread||In
instantiation of 'std::shared_ptr >
std::thread::_M_make_routine(_Callable&&) [with _Callable =
std::_Bind_simple()>]':|
d:\mingw\bin\..\lib\gcc\i686-w64-mingw32\4.7.1\include\c++\thread|133|required
from 'std::thread::thread(_Callable&&, _Args&& ...) [with _Callable =
std::_Bind; _Args = {}]'|
F:\Programing\Temp\T9.cpp|31|required from here|
d:\mingw\bin\..\lib\gcc\i686-w64-mingw32\4.7.1\include\c++\thread|191|sorry,
unimplemented: use of 'type_pack_expansion' in template|
d:\mingw\bin\..\lib\gcc\i686-w64-mingw32\4.7.1\include\c++\thread|191|sorry,
unimplemented: use of 'type_pack_expansion' in template|
d:\mingw\bin\..\lib\gcc\i686-w64-mingw32\4.7.1\include\c++\thread|191|error:
call of overloaded 'make_shared(std::_Bind_simple()>)' is ambiguous|
d:\mingw\bin\..\lib\gcc\i686-w64-mingw32\4.7.1\include\c++\thread|191|note:
candidates are:|
d:\mingw\bin\..\lib\gcc\i686-w64-mingw32\4.7.1\include\c++\bits\shared_ptr.h|611|note:
std::shared_ptr<_Tp1> std::make_shared(_Args&& ...) [with _Tp =
std::thread::_Impl()> >; _Args =
{std::_Bind_simple()>}]|
F:\Programing\Temp\T9.cpp|22|note: void make_shared(P&& ...) [with
 = std::thread::_Impl()> >; P = {std::_Bind_simple()>}]|

The line 191 of (in member template _M_make_routine):

return make_shared<_Impl<_Callable>>(std::forward<_Callable>(__f));

After I adding "std::" before "make_shared", it works fine.

Note: there is something wrong with the error message("unimplemented"). I'd
file another bug for it.


[Bug debug/53820] [4.8 Regression] ICE in vt_expand_var_loc_chain, at var-tracking.c:8029

2012-07-06 Thread aoliva at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=53820

Alexandre Oliva  changed:

   What|Removed |Added

 Status|ASSIGNED|RESOLVED
 Resolution||FIXED

--- Comment #5 from Alexandre Oliva  2012-07-06 
11:37:40 UTC ---
Author: aoliva
Date: Fri Jul  6 11:37:36 2012
New Revision: 189326

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=189326
Log:
PR debug/53820
* var-tracking.c (vt_add_function_parameter): Convert
internal_arg_pointer into arg_pointer-based address even
without DRAP.

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

--- Comment #6 from Alexandre Oliva  2012-07-06 
12:18:27 UTC ---
Fixed


[Bug rtl-optimization/53827] [4.8 Regression][alpha]: Invalid insn scheduling in sched1 pass

2012-07-06 Thread aoliva at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=53827

Alexandre Oliva  changed:

   What|Removed |Added

 Status|ASSIGNED|RESOLVED
 Resolution||FIXED

--- Comment #5 from Alexandre Oliva  2012-07-06 
11:37:17 UTC ---
Author: aoliva
Date: Fri Jul  6 11:37:14 2012
New Revision: 189325

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=189325
Log:
PR rtl-optimization/53827
PR debug/53671
PR debug/49888
* alias.c (memrefs_conflict_p): Adjust offset and size by the
same amount for alignment ANDs.

Modified:
trunk/gcc/ChangeLog
trunk/gcc/alias.c

--- Comment #6 from Alexandre Oliva  2012-07-06 
12:18:51 UTC ---
Fixed


[Bug c++/53873] New: [C++11] strange error message for template overloading

2012-07-06 Thread frankhb1989 at gmail dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=53873

 Bug #: 53873
   Summary: [C++11] strange error message for template overloading
Classification: Unclassified
   Product: gcc
   Version: 4.7.1
Status: UNCONFIRMED
  Severity: trivial
  Priority: P3
 Component: c++
AssignedTo: unassig...@gcc.gnu.org
ReportedBy: frankhb1...@gmail.com


Sometimes g++ complains:
sorry, unimplemented: use of 'type_pack_expansion' in template
But there seems to be no apparent reason for this error.
Please see http://gcc.gnu.org/bugzilla/show_bug.cgi?id=53872 for details (an
example including code and full diagnostic messages).


[Bug c/53874] New: -Wswitch-enum not properly working with bitfields

2012-07-06 Thread jan.sm...@alcatel-lucent.com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=53874

 Bug #: 53874
   Summary: -Wswitch-enum not properly working with bitfields
Classification: Unclassified
   Product: gcc
   Version: 4.6.3
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: c
AssignedTo: unassig...@gcc.gnu.org
ReportedBy: jan.sm...@alcatel-lucent.com


typedef enum
{
A,
B,
C
} tEnum;


typedef struct t_A
{
 tEnum my_enum:4;
} tA;


int test(tA * bla)
{
 switch(bla->my_enum)
 {
 default:
 return 0;
 }
}



I expect the compiler to complain:

test-enum.c:23: warning: enumeration value `A' not handled in switch
test-enum.c:23: warning: enumeration value `B' not handled in switch
test-enum.c:23: warning: enumeration value `C' not handled in switch

I verified this works in GCC 3.4 but not in GCC 4.6.

Thanks


[Bug c/53874] -Wswitch-enum not properly working with bitfields

2012-07-06 Thread jan.sm...@alcatel-lucent.com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=53874

--- Comment #1 from Jan Smets  2012-07-06 
13:09:29 UTC ---
And if the :4 is removed, then it works as expected.


[Bug libstdc++/53872] [C++11] ADL bug in std::thread

2012-07-06 Thread paolo.carlini at oracle dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=53872

Paolo Carlini  changed:

   What|Removed |Added

 Status|UNCONFIRMED |ASSIGNED
   Last reconfirmed||2012-07-06
 AssignedTo|unassigned at gcc dot   |paolo.carlini at oracle dot
   |gnu.org |com
   Target Milestone|--- |4.7.2
 Ever Confirmed|0   |1

--- Comment #1 from Paolo Carlini  2012-07-06 
13:09:28 UTC ---
Mine.


[Bug c++/53858] [4.8 Regression] [C++11] template aliases used in template parameters default expression

2012-07-06 Thread jason at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=53858

Jason Merrill  changed:

   What|Removed |Added

 Status|UNCONFIRMED |ASSIGNED
   Last reconfirmed||2012-07-06
 CC||jason at gcc dot gnu.org
 AssignedTo|unassigned at gcc dot   |jason at gcc dot gnu.org
   |gnu.org |
 Ever Confirmed|0   |1


[Bug c++/53873] [C++11] strange error message for template overloading

2012-07-06 Thread paolo.carlini at oracle dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=53873

Paolo Carlini  changed:

   What|Removed |Added

 Status|UNCONFIRMED |RESOLVED
 Resolution||DUPLICATE

--- Comment #1 from Paolo Carlini  2012-07-06 
13:46:40 UTC ---
.

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


[Bug c++/53862] [C++11] sorry, unimplemented: use of 'type_pack_expansion' in template

2012-07-06 Thread paolo.carlini at oracle dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=53862

Paolo Carlini  changed:

   What|Removed |Added

 CC||frankhb1989 at gmail dot
   ||com

--- Comment #5 from Paolo Carlini  2012-07-06 
13:46:40 UTC ---
*** Bug 53873 has been marked as a duplicate of this bug. ***


[Bug c++/53862] [C++11] sorry, unimplemented: use of 'type_pack_expansion' in template

2012-07-06 Thread paolo.carlini at oracle dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=53862

Paolo Carlini  changed:

   What|Removed |Added

 CC||jason at gcc dot gnu.org

--- Comment #6 from Paolo Carlini  2012-07-06 
13:49:30 UTC ---
Let's add Jason in CC.


[Bug libstdc++/53872] [C++11] ADL bug in std::thread

2012-07-06 Thread paolo at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=53872

--- Comment #2 from paolo at gcc dot gnu.org  
2012-07-06 13:56:04 UTC ---
Author: paolo
Date: Fri Jul  6 13:55:58 2012
New Revision: 189329

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=189329
Log:
2012-07-06  Paolo Carlini  

PR libstdc++/53872
* include/std/thread (thread::_M_make_routine): Qualify make_shared
to prevent ADL.
* testsuite/30_threads/thread/adl.cc: New.

Added:
trunk/libstdc++-v3/testsuite/30_threads/thread/adl.cc
Modified:
trunk/libstdc++-v3/ChangeLog
trunk/libstdc++-v3/include/std/thread


[Bug libstdc++/53872] [C++11] ADL bug in std::thread

2012-07-06 Thread paolo at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=53872

--- Comment #2 from paolo at gcc dot gnu.org  
2012-07-06 13:56:04 UTC ---
Author: paolo
Date: Fri Jul  6 13:55:58 2012
New Revision: 189329

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=189329
Log:
2012-07-06  Paolo Carlini  

PR libstdc++/53872
* include/std/thread (thread::_M_make_routine): Qualify make_shared
to prevent ADL.
* testsuite/30_threads/thread/adl.cc: New.

Added:
trunk/libstdc++-v3/testsuite/30_threads/thread/adl.cc
Modified:
trunk/libstdc++-v3/ChangeLog
trunk/libstdc++-v3/include/std/thread

--- Comment #3 from paolo at gcc dot gnu.org  
2012-07-06 13:56:31 UTC ---
Author: paolo
Date: Fri Jul  6 13:56:24 2012
New Revision: 189330

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=189330
Log:
2012-07-06  Paolo Carlini  

PR libstdc++/53872
* include/std/thread (thread::_M_make_routine): Qualify make_shared
to prevent ADL.
* testsuite/30_threads/thread/adl.cc: New.

Added:
branches/gcc-4_7-branch/libstdc++-v3/testsuite/30_threads/thread/adl.cc
Modified:
branches/gcc-4_7-branch/libstdc++-v3/ChangeLog
branches/gcc-4_7-branch/libstdc++-v3/include/std/thread


[Bug libstdc++/53872] [C++11] ADL bug in std::thread

2012-07-06 Thread paolo at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=53872

--- Comment #3 from paolo at gcc dot gnu.org  
2012-07-06 13:56:31 UTC ---
Author: paolo
Date: Fri Jul  6 13:56:24 2012
New Revision: 189330

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=189330
Log:
2012-07-06  Paolo Carlini  

PR libstdc++/53872
* include/std/thread (thread::_M_make_routine): Qualify make_shared
to prevent ADL.
* testsuite/30_threads/thread/adl.cc: New.

Added:
branches/gcc-4_7-branch/libstdc++-v3/testsuite/30_threads/thread/adl.cc
Modified:
branches/gcc-4_7-branch/libstdc++-v3/ChangeLog
branches/gcc-4_7-branch/libstdc++-v3/include/std/thread


[Bug libstdc++/53872] [C++11] ADL bug in std::thread

2012-07-06 Thread paolo.carlini at oracle dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=53872

Paolo Carlini  changed:

   What|Removed |Added

 Status|ASSIGNED|RESOLVED
 Resolution||FIXED

--- Comment #4 from Paolo Carlini  2012-07-06 
13:59:27 UTC ---
Fixed mainline and 4.7.2.


[Bug c++/53858] [4.8 Regression] [C++11] template aliases used in template parameters default expression

2012-07-06 Thread jason at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=53858

--- Comment #2 from Jason Merrill  2012-07-06 
14:00:39 UTC ---
Author: jason
Date: Fri Jul  6 14:00:31 2012
New Revision: 189331

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=189331
Log:
PR c++/53858
* name-lookup.c (ambiguous_decl): Use DECL_TYPE_TEMPLATE_P.

Added:
trunk/gcc/testsuite/g++.dg/cpp0x/alias-decl-20.C
Modified:
trunk/gcc/cp/ChangeLog
trunk/gcc/cp/name-lookup.c
trunk/gcc/testsuite/ChangeLog


[Bug c++/53875] New: calls to const functions are eliminated at -O0

2012-07-06 Thread James.H.McKim at nasa dot gov
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=53875

 Bug #: 53875
   Summary: calls to const functions are eliminated at -O0
Classification: Unclassified
   Product: gcc
   Version: 4.6.3
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: c++
AssignedTo: unassig...@gcc.gnu.org
ReportedBy: james.h.mc...@nasa.gov


Compiler version 4.6.3.
System: ubuntu 12.1

When source containing a call to a const function is compiled, that function's
invocation is always (regardless of -O level) eliminated if the returned result
is discarded. That action is an optimization, and when no optimization is
specified, having it happen is surprising.

If the compiler is intended to always eliminate, it would be helpful if there
was a diagnostic indicating the elimination. For instance, instead of the
warning "statement has no effect", maybe "statement has no effect,
eliminating".


The code was compiled with the command:

g++ -O0 -S -o t1b.lst t1b.cxx


The example code (t1b.cxx):

extern int pthread_self (void) __attribute__ ((__const__));

int main() {

  // Demonstrate the compiler doesn't emit this call.
  pthread_self();

  // A workaround.
  // volatile int x = pthread_self();

  return 0;
}


[Bug fortran/53876] New: ICE: OOP Class array

2012-07-06 Thread pogos77 at hotmail dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=53876

 Bug #: 53876
   Summary: ICE: OOP Class array
Classification: Unclassified
   Product: gcc
   Version: 4.8.0
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: fortran
AssignedTo: unassig...@gcc.gnu.org
ReportedBy: pogo...@hotmail.com


Created attachment 27751
  --> http://gcc.gnu.org/bugzilla/attachment.cgi?id=27751
Module containing types declaration and test program

The following error was encountered when I run the attached program.
Apparently, this had already been reported and presumingly fixed but the bug
still persists.

oop_class_array.f90: In function ‘display_population’:
oop_class_array.f90:111:0: internal compiler error: in gfc_add_modify_loc, at
fortran/trans.c:161
CALL self%indv(i)%display()
 ^

I program in Ubuntu i686 and using the latest gfortran:
gcc version 4.8.0 20120624 (experimental) (GCC) 

Any way forward.

Thanks


[Bug middle-end/53865] [4.8 Regression] 176.gcc in SPEC CPU 2000 failed to build with LTO

2012-07-06 Thread hjl.tools at gmail dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=53865

H.J. Lu  changed:

   What|Removed |Added

 CC||ubizjak at gmail dot com

--- Comment #4 from H.J. Lu  2012-07-06 14:13:30 
UTC ---
This is caused by revision 189261:

http://gcc.gnu.org/ml/gcc-cvs/2012-07/msg00165.html


[Bug target/53877] New: __lzcnt_u16/__lzcnt_u32/__lzcnt_u64 aren't implemented

2012-07-06 Thread hjl.tools at gmail dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=53877

 Bug #: 53877
   Summary: __lzcnt_u16/__lzcnt_u32/__lzcnt_u64 aren't implemented
Classification: Unclassified
   Product: gcc
   Version: 4.7.2
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: target
AssignedTo: unassig...@gcc.gnu.org
ReportedBy: hjl.to...@gmail.com
CC: kirill.yuk...@intel.com, ubiz...@gmail.com


Intel AVX spec specifies __lzcnt_u16/__lzcnt_u32/__lzcnt_u64
intrinsics.  They aren't implemented in GCC.


[Bug c++/53878] New: Abstract class constructors

2012-07-06 Thread aschepler at gmail dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=53878

 Bug #: 53878
   Summary: Abstract class constructors
Classification: Unclassified
   Product: gcc
   Version: unknown
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: c++
AssignedTo: unassig...@gcc.gnu.org
ReportedBy: aschep...@gmail.com


The following code is ill-formed C++03 and well-formed C++11, but g++ does not
accept it with the -std=c++0x flag:

class Base {
public:
  explicit Base(int);
};

class Abstract : virtual public Base {
public:
  Abstract();
  virtual ~Abstract() = 0;
};

Abstract::Abstract()
{}

See Standard 2011 section 12.6.2 paragraph 8.  "if a given non-static data
member or base class is not designated by a mem-initializer-id ... and the
entity is not a virtual base class of an abstract class, then ... [if the
entity is not a data member with an initializer in the class definition and is
not a variant member,] the entity is default-initialized". 

$ g++ -v
Using built-in specs.
COLLECT_GCC=g++
COLLECT_LTO_WRAPPER=/usr/lib/gcc/i486-linux-gnu/4.7/lto-wrapper
Target: i486-linux-gnu
Configured with: ../src/configure -v --with-pkgversion='Debian 4.7.1-2'
--with-bugurl=file:///usr/share/doc/gcc-4.7/README.Bugs
--enable-languages=c,c++,go,fortran,objc,obj-c++ --prefix=/usr
--program-suffix=-4.7 --enable-shared --enable-linker-build-id
--with-system-zlib --libexecdir=/usr/lib --without-included-gettext
--enable-threads=posix --with-gxx-include-dir=/usr/include/c++/4.7
--libdir=/usr/lib --enable-nls --with-sysroot=/ --enable-clocale=gnu
--enable-libstdcxx-debug --enable-libstdcxx-time=yes --enable-gnu-unique-object
--enable-plugin --enable-objc-gc --enable-targets=all --with-arch-32=i586
--with-tune=generic --enable-checking=release --build=i486-linux-gnu
--host=i486-linux-gnu --target=i486-linux-gnu
Thread model: posix
gcc version 4.7.1 (Debian 4.7.1-2)


[Bug c++/53858] [4.8 Regression] [C++11] template aliases used in template parameters default expression

2012-07-06 Thread jason at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=53858

Jason Merrill  changed:

   What|Removed |Added

 Status|ASSIGNED|RESOLVED
 Resolution||FIXED

--- Comment #3 from Jason Merrill  2012-07-06 
15:38:06 UTC ---
Fixed.


[Bug c++/53862] [C++11] sorry, unimplemented: use of 'type_pack_expansion' in template

2012-07-06 Thread jason at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=53862

--- Comment #7 from Jason Merrill  2012-07-06 
15:45:15 UTC ---
Author: jason
Date: Fri Jul  6 15:45:10 2012
New Revision: 189334

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=189334
Log:
PR c++/53862
* pt.c (tsubst_arg_types): Add "end" parameter.
(check_undeduced_parms): Use it.

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


[Bug go/53879] New: new glibc: sysinfo.go:5976:68: error: expected ‘{’

2012-07-06 Thread jan.kratochvil at redhat dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=53879

 Bug #: 53879
   Summary: new glibc: sysinfo.go:5976:68: error: expected ‘{’
Classification: Unclassified
   Product: gcc
   Version: 4.8.0
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: go
AssignedTo: i...@airs.com
ReportedBy: jan.kratoch...@redhat.com
 Build: x86_64-unknown-linux-gnu


Fedora 17 x86_64 builds gccgo OK but Fedora 18 (Rawhide) x86_64 does not.
Tested only FSF GCC HEAD.

sysinfo.go:5976:68: error: expected ‘{’
 type Rusage struct { Utime Timeval; Stime Timeval; Godump_0 struct ru_maxrss
int64; ; Godump_1 struct ru_ixrss int64; ; Godump_2 struct ru_idrss int64; ;
Godump_3 struct ru_isrss int64; ; Godump_4 struct ru_minflt int64; ; Godump_5
struct ru_majflt int64; ; Godump_6 struct ru_nswap int64; ; Godump_7 struct
ru_inblock int64; ; Godump_8 struct ru_oublock int64; ; Godump_9 struct
ru_msgsnd int64; ; Godump_10 struct ru_msgrcv int64; ; Godump_11 struct
ru_nsignals int64; ; Godump_12 struct ru_nvcsw int64; ; Godump_13 struct
ru_nivcsw int64; ; }
^
sysinfo.go:5976:68: error: expected ‘;’ or ‘}’ or newline
sysinfo.go:5976:85: error: expected field name

with many similar errors.

/usr/include/bits/resource.h:
PASS: glibc-headers-2.15-37.fc17.x86_64
FAIL: glibc-headers-2.15.90-16.fc18.x86_64

Untested but IMO it is due to:
commit 5e1a27a96de16ad0cd67a81e25741790b32e2c25
Author: H.J. Lu 
Date:   Tue May 22 05:32:34 2012 -0700
Pad each field to __syscall_slong_t in struct rusage
http://sourceware.org/git/?p=glibc.git;a=commitdiff;h=5e1a27a96de16ad0cd67a81e25741790b32e2c25


[Bug c++/53862] [4.6/4.7 regression] [C++11] sorry, unimplemented: use of 'type_pack_expansion' in template

2012-07-06 Thread jason at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=53862

Jason Merrill  changed:

   What|Removed |Added

   Keywords||rejects-valid
 Status|NEW |ASSIGNED
   Target Milestone|--- |4.6.4
Summary|[C++11] sorry,  |[4.6/4.7 regression]
   |unimplemented: use of   |[C++11] sorry,
   |'type_pack_expansion' in|unimplemented: use of
   |template|'type_pack_expansion' in
   ||template

--- Comment #7 from Jason Merrill  2012-07-06 
15:45:15 UTC ---
Author: jason
Date: Fri Jul  6 15:45:10 2012
New Revision: 189334

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=189334
Log:
PR c++/53862
* pt.c (tsubst_arg_types): Add "end" parameter.
(check_undeduced_parms): Use it.

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

--- Comment #8 from Jason Merrill  2012-07-06 
15:46:12 UTC ---
This is a regression from 4.4.  Fixed on trunk.


[Bug c++/53862] [4.6/4.7 regression] [C++11] sorry, unimplemented: use of 'type_pack_expansion' in template

2012-07-06 Thread jason at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=53862

Jason Merrill  changed:

   What|Removed |Added

   Keywords||rejects-valid
 Status|NEW |ASSIGNED
   Target Milestone|--- |4.6.4
Summary|[C++11] sorry,  |[4.6/4.7 regression]
   |unimplemented: use of   |[C++11] sorry,
   |'type_pack_expansion' in|unimplemented: use of
   |template|'type_pack_expansion' in
   ||template

--- Comment #8 from Jason Merrill  2012-07-06 
15:46:12 UTC ---
This is a regression from 4.4.  Fixed on trunk.


[Bug pch/53880] New: [4.8 Regression] compile time regression when generating precompiled headers for boost

2012-07-06 Thread markus at trippelsdorf dot de
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=53880

 Bug #: 53880
   Summary: [4.8 Regression] compile time regression when
generating precompiled headers for boost
Classification: Unclassified
   Product: gcc
   Version: 4.8.0
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: pch
AssignedTo: unassig...@gcc.gnu.org
ReportedBy: mar...@trippelsdorf.de


There is a huge compile time regression in 4.8 when one generates 
a precompiled header for boost's /math/special_functions.hpp.

gcc-4.7:
 % time c++ -c -o pch.hpp.gch /usr/include/boost/math/special_functions.hpp
c++ -c -o pch.hpp.gch /usr/include/boost/math/special_functions.hpp  2.26s user
0.13s system 99% cpu 2.407 total

gcc-4.8:
 % time c++ -c -o pch.hpp.gch /usr/include/boost/math/special_functions.hpp
c++ -c -o pch.hpp.gch /usr/include/boost/math/special_functions.hpp  172.42s
user 0.37s system 99% cpu 2:53.44 total


[Bug pch/53880] [4.8 Regression] compile time regression when generating precompiled headers for boost

2012-07-06 Thread markus at trippelsdorf dot de
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=53880

--- Comment #1 from Markus Trippelsdorf  
2012-07-06 15:54:43 UTC ---
Boost version is 1.49.
(When I use --save-temps and use the resulting .ii file instead, the regression
is no longer reproducible)


[Bug fortran/53851] Automatic silent allocation/deallocation of allocatable variables in several instances

2012-07-06 Thread liluli2011 at gmail dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=53851

--- Comment #3 from liluli2011 at gmail dot com 2012-07-06 16:06:12 UTC ---
Thank you Harald and karql. I should have read the new (or not so new) features
of the 2003 standard before posting instead of relying so much on the
comparison with ifort. In fact, (re)allocation on assignment does make sense,
although it can be also potentially dangerous. Thus it is convenient that there
are ways to disable it.


[Bug c++/53873] [C++11] strange error message for template overloading

2012-07-06 Thread redi at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=53873

--- Comment #2 from Jonathan Wakely  2012-07-06 
16:06:25 UTC ---
Please search for existing bugs before submitting.


[Bug fortran/53851] Automatic silent allocation/deallocation of allocatable variables in several instances

2012-07-06 Thread liluli2011 at gmail dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=53851

--- Comment #4 from liluli2011 at gmail dot com 2012-07-06 16:09:08 UTC ---
Thank you Harald and karql. I should have read the new (or not so new) features
of the 2003 standard before posting instead of relying so much on the
comparison with ifort. In fact, (re)allocation on assignment does make sense,
although it can be also potentially dangerous. Thus it is convenient that there
are ways to disable it.


[Bug tree-optimization/46032] openmp inhibits loop vectorization

2012-07-06 Thread fchen0000 at gmail dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=46032

Feng Chen  changed:

   What|Removed |Added

 CC||fchen at gmail dot com

--- Comment #7 from Feng Chen  2012-07-06 16:17:28 
UTC ---
Any update on this? I do see loops getting slower even for large nx*ny
sometimes after omp on gcc 4.6.2, e.g.,

#pragma omp parallel for
for(int iy=0; iy Good. But it Graphite breaks it, let's add Sebastian in CC..


[Bug target/53859] ICE when calculate insn latency for armv7e-m arch in O2 level

2012-07-06 Thread Greta.Yorsh at arm dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=53859

Greta Yorsh  changed:

   What|Removed |Added

 CC||Greta.Yorsh at arm dot com,
   ||joey.ye at arm dot com

--- Comment #1 from Greta Yorsh  2012-07-06 
16:21:43 UTC ---
Caused by my patch for generating epilogue in RTL (r188742). Looking into it...

Thanks,
Greta


[Bug pch/53880] [4.8 Regression] compile time regression when generating precompiled headers for boost

2012-07-06 Thread markus at trippelsdorf dot de
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=53880

Markus Trippelsdorf  changed:

   What|Removed |Added

 CC||dodji at gcc dot gnu.org

--- Comment #2 from Markus Trippelsdorf  
2012-07-06 16:47:20 UTC ---
Started with rev.186977:

commit 611f1003dbf4ebb341c2eda0fcc0e058c421eb6b
Author: dodji 
Date:   Mon Apr 30 11:43:43 2012 +

Switch -ftrack-macro-expansion=2 on by default.

This switches the compiler to -ftrack-macro-expansion=2 by default.
...


Using -ftrack-macro-expansion=0 "fixes" the issue.


[Bug c/53881] New: ice in emit_case_bit_tests

2012-07-06 Thread dcb314 at hotmail dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=53881

 Bug #: 53881
   Summary: ice in emit_case_bit_tests
Classification: Unclassified
   Product: gcc
   Version: 4.8.0
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: c
AssignedTo: unassig...@gcc.gnu.org
ReportedBy: dcb...@hotmail.com


Created attachment 27752
  --> http://gcc.gnu.org/bugzilla/attachment.cgi?id=27752
C source code

I just tried to compile the package Macaulay2-1.4-7
on gcc-4.8 trunk dated 20120704 on an AMD x86_64 box.

The compiler said

actors5.d: In function 'newmethod1234c':
actors5.d:1981:3: internal compiler error: in emit_case_bit_tests, at
tree-switch-conversion.c:340
 setupfun("GCstats",GCstats);
   ^
Please submit a full bug report,
with preprocessed source if appropriate.
See  for instructions.

Preprocessed source code attached. Flag -O2 required.


[Bug c/53881] ice in emit_case_bit_tests

2012-07-06 Thread markus at trippelsdorf dot de
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=53881

Markus Trippelsdorf  changed:

   What|Removed |Added

 CC||markus at trippelsdorf dot
   ||de

--- Comment #1 from Markus Trippelsdorf  
2012-07-06 17:51:31 UTC ---
With your testcase I get:
...
bug80.c:30739:3: internal compiler error: in hoist_edge_and_branch_if_true, at
tree-switch-conversion.c:79

Reduced:

int a, b;
void
fn1 ()
{
  int c;
  switch (a)
{
case 8:
  c = 0;
  goto Label;
case 0:
case 1:
Label:
  break;
default:
  b = 0;
}
}


[Bug target/53689] [SH] GCC emits an invalid slot instruction for RTE (Return from Exception)

2012-07-06 Thread olegendo at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=53689

--- Comment #1 from Oleg Endo  2012-07-06 17:59:34 
UTC ---
(In reply to comment #0)
> Under target (sh-elf) big-endian SuperH-2 (SH7604) (options -m2 -mb
> -fno-omit-frame-pointer).
> 
> When defining an interrupt handler:
> static void __attribute__ ((interrupt_handler))
> foo(void)
> {
> }
> 
> GCC 4.5.3 emits the following:
> 
>  <_foo>:
>0:2f e6   mov.lr14,@-r15
>2:6e f3   movr15,r14
>4:6f e3   movr14,r15
>6:00 2b   rte
>8:6e f6   mov.l@r15+,r14
> 

Please notice that GCC 4.5.x is no longer supported.
The last official GCC 4.5.x version is GCC 4.5.4 which was released
on 2012-07-02.

I've checked this case with SVN rev 189268 (GCC 4.8) and this problem is not
present.


[Bug libfortran/51418] Fortran format sp,f0.0 output wrong with NaN and 0.0

2012-07-06 Thread bdavis at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=51418

Bud Davis  changed:

   What|Removed |Added

 Status|UNCONFIRMED |RESOLVED
 CC||bdavis at gcc dot gnu.org
 Resolution||FIXED

--- Comment #4 from Bud Davis  2012-07-06 18:16:49 
UTC ---
>From reading the summary, the bug is fixed in recent versions, and no further
action is to be taken.  Thus "RESOLVED / FIXED".


[Bug c/53881] ice in emit_case_bit_tests

2012-07-06 Thread markus at trippelsdorf dot de
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=53881

Markus Trippelsdorf  changed:

   What|Removed |Added

 CC||steven at gcc dot gnu.org

--- Comment #2 from Markus Trippelsdorf  
2012-07-06 18:18:23 UTC ---
Started with rev.189173:

78b7a67520737f2e029383dd5a89ba8c1c4a3ef9 is the first bad commit
commit 78b7a67520737f2e029383dd5a89ba8c1c4a3ef9
Author: steven 
Date:   Mon Jul 2 18:50:51 2012 +

gcc/
* stmt.c (emit_case_bit_tests): Remove.
(expand_case): Remove expand_switch_using_bit_tests_p code.
* tree-switch-conversion.c (hoist_edge_and_branch_if_true): New.
(MAX_CASE_BIT_TESTS): Moved from stmt.c to here.
(lshift_cheap_p): Likewise.
(expand_switch_using_bit_tests_p): Likewise.
(struct case_bit_test): Likewise.
(case_bit_test_cmp): Likewise.
(emit_case_bit_tests): New implementation for GIMPLE.
(gen_inbound_check): Do not release post-dominator info here.
(process_switch): Reorder code.  Expand as bit tests if it
looks like a win.
(do_switchconv): Release post-dominator info here if something
changed.
(struct gimple_opt_pass): Verify more.
* tree.h (expand_switch_using_bit_tests_p): Remove prototype.

testsuite/
* gcc.dg/tree-ssa/pr36881.c: Fix test case to not expand as bit tests.


[Bug middle-end/53321] [4.8 Regression] LTO bootstrap failed with bootstrap-profiled

2012-07-06 Thread hjl.tools at gmail dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=53321

Uros Bizjak  changed:

   What|Removed |Added

 Status|ASSIGNED|RESOLVED
 Resolution||FIXED

H.J. Lu  changed:

   What|Removed |Added

 Status|RESOLVED|REOPENED
 Resolution|FIXED   |

--- Comment #20 from Uros Bizjak  2012-07-04 13:57:53 
UTC ---
.

--- Comment #21 from H.J. Lu  2012-07-06 18:29:50 
UTC ---
The fix caused PR 53865.  The even smaller testcase:

[hjl@gnu-mic-2 pr53321]$ cat x.i
extern char *src;
extern const char *sources;
extern unsigned int n_sources;

static void
find_source (const char *file_name)
{
 __builtin_memcpy (src, sources, n_sources);
}

int main ()
{
  find_source (sources);
}
[hjl@gnu-mic-2 pr53321]$ /export/build/gnu/gcc/build-x86_64-linux/gcc/xgcc
-B/export/build/gnu/gcc/build-x86_64-linux/gcc/ -O2 -fprofile-generate -S x.i
x.i:14:1: internal compiler error: vector VEC(inline_edge_summary_t,base) index
domain error, in inline_edge_summary at ipa-inline.h:200
 }
 ^
Please submit a full bug report,
with preprocessed source if appropriate.
See  for instructions.
[hjl@gnu-mic-2 pr53321]$


[Bug middle-end/53321] [4.8 Regression] LTO bootstrap failed with bootstrap-profiled

2012-07-06 Thread hjl.tools at gmail dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=53321

--- Comment #22 from H.J. Lu  2012-07-06 18:46:09 
UTC ---
After inlining, IPA calls tree_profiling which rebuilds edges:

#2  0x00683ccd in rebuild_cgraph_edges ()
at /export/gnu/import/git/gcc/gcc/cgraphbuild.c:433
#3  0x00c02de6 in tree_profiling ()
at /export/gnu/import/git/gcc/gcc/tree-profile.c:564
#4  0x00a1be4f in execute_one_pass (pass=0x1908520)
at /export/gnu/import/git/gcc/gcc/passes.c:2165
#5  0x00a1cb0c in execute_ipa_pass_list (pass=0x1908520)
at /export/gnu/import/git/gcc/gcc/passes.c:2532
#6  0x0068b874 in ipa_passes ()
at /export/gnu/import/git/gcc/gcc/cgraphunit.c:1844

  basic_block bb; 
  struct cgraph_node *node = cgraph_get_node (current_function_decl);
  gimple_stmt_iterator gsi;

  cgraph_node_remove_callees (node);
  ipa_remove_all_references (&node->symbol.ref_list);

  node->count = ENTRY_BLOCK_PTR->count;

and creates new edges.  After that, all things went downhill

#0  internal_error (
gmsgid=0x158c110 "vector %s %s domain error, in %s at %s:%u")
at /export/gnu/import/git/gcc/gcc/diagnostic.c:955
#1  0x0124f707 in vec_assert_fail (op=0x12fc800 "index", 
struct_name=0x12fc7e0 "VEC(inline_edge_summary_t,base)", 
file=0x12fc808 "/export/gnu/import/git/gcc/gcc/ipa-inline.h", line=200, 
function=0x12fd380 "inline_edge_summary")
at /export/gnu/import/git/gcc/gcc/vec.c:527
#2  0x0067c685 in VEC_inline_edge_summary_t_base_index (
vec_=0x1aea360, ix_=6, 
file_=0x12fc808 "/export/gnu/import/git/gcc/gcc/ipa-inline.h", line_=200, 
function_=0x12fd380 "inline_edge_summary")
at /export/gnu/import/git/gcc/gcc/ipa-inline.h:145
#3  0x0067c6cd in inline_edge_summary (edge=0x71ab67b8)
at /export/gnu/import/git/gcc/gcc/ipa-inline.h:199

since inline_edge_summary_vec was never updated.


[Bug bootstrap/52947] [4.7/4.8 Regression] bootstrap fails due to wrong include search path composition

2012-07-06 Thread ktietz at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=52947

--- Comment #7 from Kai Tietz  2012-07-06 18:54:24 
UTC ---
Author: ktietz
Date: Fri Jul  6 18:54:20 2012
New Revision: 189338

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=189338
Log:
PR bootstrap/52947
* config/i386/mingw32.h (NATIVE_SYSTEM_HEADER_DIR): Define it always
as "/mingw/include".

Modified:
trunk/gcc/ChangeLog
trunk/gcc/config/i386/mingw32.h


[Bug bootstrap/52947] [4.7/4.8 Regression] bootstrap fails due to wrong include search path composition

2012-07-06 Thread ktietz at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=52947

--- Comment #8 from Kai Tietz  2012-07-06 18:56:15 
UTC ---
Author: ktietz
Date: Fri Jul  6 18:56:09 2012
New Revision: 189339

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=189339
Log:
Backport from mainline.
PR bootstrap/52947
* config/i386/mingw32.h (NATIVE_SYSTEM_HEADER_DIR): Define it always
as "/mingw/include".

Modified:
branches/gcc-4_7-branch/gcc/ChangeLog
branches/gcc-4_7-branch/gcc/config/i386/mingw32.h


[Bug bootstrap/52947] [4.7/4.8 Regression] bootstrap fails due to wrong include search path composition

2012-07-06 Thread ktietz at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=52947

Kai Tietz  changed:

   What|Removed |Added

 Status|NEW |RESOLVED
 Resolution||FIXED

--- Comment #9 from Kai Tietz  2012-07-06 18:58:08 
UTC ---
Fixed.


[Bug fortran/53732] [4.7/4.8 Regression] "mismatching comparison operand types" on compile

2012-07-06 Thread mikael at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=53732

--- Comment #10 from Mikael Morin  2012-07-06 
19:51:18 UTC ---
Author: mikael
Date: Fri Jul  6 19:51:15 2012
New Revision: 189341

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=189341
Log:
fortran/
PR fortran/53732
* trans-array.c (gfc_add_loop_ss_code): Disable self recursive calls
handling nested loop(s) if the subscript flag is true.

testsuite/
PR fortran/53732
* gfortran.dg/inline_sum_4.f90: New test.


Added:
branches/gcc-4_7-branch/gcc/testsuite/gfortran.dg/inline_sum_4.f90
Modified:
branches/gcc-4_7-branch/gcc/fortran/ChangeLog
branches/gcc-4_7-branch/gcc/fortran/trans-array.c
branches/gcc-4_7-branch/gcc/testsuite/ChangeLog


[Bug fortran/53732] [4.7/4.8 Regression] "mismatching comparison operand types" on compile

2012-07-06 Thread mikael at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=53732

Mikael Morin  changed:

   What|Removed |Added

 Status|ASSIGNED|RESOLVED
 Resolution||FIXED

--- Comment #11 from Mikael Morin  2012-07-06 
19:54:19 UTC ---
Fixed on the trunk (4.8.0) and the 4.7 branch (4.7.2).


[Bug middle-end/53321] [4.8 Regression] LTO bootstrap failed with bootstrap-profiled

2012-07-06 Thread hjl.tools at gmail dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=53321

--- Comment #23 from H.J. Lu  2012-07-06 20:22:55 
UTC ---
Created attachment 27753
  --> http://gcc.gnu.org/bugzilla/attachment.cgi?id=27753
A different patch

This patch calls inline_free_summary to clear
stale inline summary.  It fixed PR 53865.  I am
testing LTO profile bootstrap now.


[Bug tree-optimization/53805] combine_comparisons changes trapping behavior

2012-07-06 Thread glisse at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=53805

--- Comment #9 from Marc Glisse  2012-07-06 21:53:32 
UTC ---
Suspicious code:
combine_comparisons has special code that depends on which comparison comes
first, but maybe_fold_and_comparisons calls and_comparisons_1 (and thus
combine_comparisons) with arguments in both orders. I guess this would give a
wrong optimization for ORDERED_EXPR && LT_EXPR, but I am having a hard time
creating an ORDERED_EXPR.

It looks like invert_tree_comparison shouldn't return ERROR_MARK for
(UN)ORDERED_EXPR.


[Bug c++/53882] New: [4.6/4.7 Regression] ICE in type_contains_placeholder_1, at tree.c:3015

2012-07-06 Thread doko at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=53882

 Bug #: 53882
   Summary: [4.6/4.7 Regression] ICE in
type_contains_placeholder_1, at tree.c:3015
Classification: Unclassified
   Product: gcc
   Version: 4.7.1
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: c++
AssignedTo: unassig...@gcc.gnu.org
ReportedBy: d...@gcc.gnu.org


seen with the 4.7 branch 20120704 and trunk, works with 4.6:


$ g++ -std=c++0x -c -O foo.cc 
foo.cc: In constructor 'std::function<_Res(_ArgTypes ...)>::function(_Functor)
[with _Functor = std::_Bind(User*,
std::nullptr_t)>;  = void; _Res = void; _ArgTypes =
{}]':
foo.cc:12:1: internal compiler error: in type_contains_placeholder_1, at
tree.c:3015
 }
 ^
Please submit a full bug report,
with preprocessed source if appropriate.

#include 

struct User
{
void run(void *) {}
};

int main()
{
User u;
std::function p = std::bind(&User::run, &u, nullptr);
}


[Bug target/39423] [4.6/4.7/4.8 Regression] [SH] performance regression: lost mov @(disp,Rn)

2012-07-06 Thread olegendo at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=39423

--- Comment #15 from Oleg Endo  2012-07-06 
22:04:15 UTC ---
Created attachment 27754
  --> http://gcc.gnu.org/bugzilla/attachment.cgi?id=27754
combine pass based patch

A possible combine pass based solution for the problem.
It fixes the case mentioned in the original description.

I've also briefly checked some CSiBE code size results with this
patch applied to rev 189338 for '-m4-single -ml -O2 -mpretend-cmove'.
It hits only a few spots, but if those are buried inside loops, it might
be a win.

I'm not sure what's the best thing to do if the mov.l displacement
goes out of range...

Chris, I know it's been a while but any old memories? :)


[Bug c++/53882] [4.7/4.8 Regression] ICE in type_contains_placeholder_1, at tree.c:3015

2012-07-06 Thread doko at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=53882

--- Comment #1 from Matthias Klose  2012-07-06 
22:04:26 UTC ---
[forwarded from http://bugs.debian.org/680521]

"Seems related to optimization and nullptr in args. When nullptr is replaced
with (void *)0, gcc compiles the code successfully."


[Bug c/53881] [4.8 regression] ICE in hoist_edge_and_branch_if_true

2012-07-06 Thread ebotcazou at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=53881

Eric Botcazou  changed:

   What|Removed |Added

 Status|UNCONFIRMED |NEW
   Last reconfirmed||2012-07-06
 CC||ebotcazou at gcc dot
   ||gnu.org
   Target Milestone|--- |4.8.0
Summary|ice in emit_case_bit_tests  |[4.8 regression] ICE in
   ||hoist_edge_and_branch_if_tr
   ||ue
 Ever Confirmed|0   |1

--- Comment #3 from Eric Botcazou  2012-07-06 
22:33:18 UTC ---
We have similar failures on Ada code.


[Bug c/53881] [4.8 regression] ICE in hoist_edge_and_branch_if_true

2012-07-06 Thread steven at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=53881

Steven Bosscher  changed:

   What|Removed |Added

 Status|NEW |ASSIGNED
 CC|steven at gcc dot gnu.org   |
 AssignedTo|unassigned at gcc dot   |steven at gcc dot gnu.org
   |gnu.org |


[Bug middle-end/53321] [4.8 Regression] LTO bootstrap failed with bootstrap-profiled

2012-07-06 Thread hjl.tools at gmail dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=53321

H.J. Lu  changed:

   What|Removed |Added

  Attachment #27753|0   |1
is obsolete||

--- Comment #24 from H.J. Lu  2012-07-06 23:17:18 
UTC ---
Created attachment 27755
  --> http://gcc.gnu.org/bugzilla/attachment.cgi?id=27755
The updated patch


[Bug c/53881] [4.8 regression] ICE in hoist_edge_and_branch_if_true

2012-07-06 Thread steven at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=53881

--- Comment #4 from Steven Bosscher  2012-07-06 
23:28:55 UTC ---
The problem is that the switch is not fully cleaned up, there are multiple case
labels going to the same target basic block:

(gdb) p debug_bb(e->src)
;; basic block 2, loop depth 0, count 0
;; prev block 0, next block 3
;; pred:   ENTRY (fallthru,exec)
;; succ:   3 (exec) 4 (exec)
:
a.0_1 = a;
switch (a.0_1) , case 0 ... 1: , case 8: Label>

$13 = void
(gdb) p debug_bb(e->dest)
;; basic block 4, loop depth 0, count 0
;; prev block 3, next block 1
;; pred:   2 (exec) 3 (fallthru,exec)
;; succ:   EXIT
Label:
:
return;


Provisional patch:

Index: tree-switch-conversion.c
===
--- tree-switch-conversion.c(revision 189341)
+++ tree-switch-conversion.c(working copy)
@@ -329,14 +329,13 @@ emit_case_bit_tests (gimple swtch, tree index_expr
   unsigned int lo, hi;
   tree cs = gimple_switch_label (swtch, i);
   tree label = CASE_LABEL (cs);
+  edge e = find_edge (switch_bb, label_to_block (label));
   for (k = 0; k < count; k++)
-   if (label == test[k].label)
+   if (e == test[k].target_edge)
  break;

   if (k == count)
{
- edge e = find_edge (switch_bb, label_to_block (label));
- gcc_assert (e);
  gcc_checking_assert (count < MAX_CASE_BIT_TESTS);
  test[k].hi = 0;
  test[k].lo = 0;


[Bug target/53789] ICE in gen_reg_rtx, at emit-rtl.c:864/865 when compiling GNU MPFR on parisc

2012-07-06 Thread vincent-gcc at vinc17 dot net
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=53789

--- Comment #5 from Vincent Lefèvre  2012-07-07 
00:30:40 UTC ---
(In reply to comment #1)
> Please try with a version of GCC that is still maintained.

I can't reproduce the bug with GCC trunk.


[Bug driver/53883] New: GCC 4.7.1 doesn't build on Mac OS X 10.4.11 Tiger/PowerPC (32-bit)

2012-07-06 Thread dwalker07 at yahoo dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=53883

 Bug #: 53883
   Summary: GCC 4.7.1 doesn't build on Mac OS X 10.4.11
Tiger/PowerPC (32-bit)
Classification: Unclassified
   Product: gcc
   Version: 4.7.1
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: driver
AssignedTo: unassig...@gcc.gnu.org
ReportedBy: dwalke...@yahoo.com


I'm using an August-2002 Apple eMac, with a PowerPC-G4 chip.  GCC is one of the
software packages offered by MacPorts.  I'm on a Tiger, PowerPC, and 32-bit
system; any of those puts me in near-abandoned status, so the fact I'm all 3
meant that their team abandoned me to fix the problem on my own, possibly with
your help.

I'm frustrated since GCC 4.7.0 built fine with some tweaks provided by the
MacPorts team.  From a brief glance at the logs, something about a linking
error with your included version of libFFI came up.  Unlike some earlier GCC
versions on MacPorts, like GCC 4.4 and 4.5, I don't think GCC 4.7 uses any
patched files; issues with LibFFI on earlier versions may have been integrated
into the source, but now I'm not so sure.

Here's how I tried to build it:
1. Use "sudo port edit --editor nano gcc47" to edit the Portfile for GCC-4.7
1a. Comment-out the "supported_archs i386 x86_64" line to:
"#supported_archs i386 x86_64"
(They "dealt" with the build problems on PowerPC by summarily executing
 the PowerPC build.  Comment out the ban so you can try it.)
2. "sudo port upgrade gcc47 configure.compiler=apple-gcc-4.2"
   (This requires MacPorts' version of Apple-provided GCC 4.2 to be
installed first.)
3. This ended up with an error.
4. Use "port log gcc47 > gcc47.log" to get the log so I can attach it here

(I don't know how to kick-start the process on a PowerPC system that never had
"gcc47" on it.  For all I know, the MacPorts program may read the
supported-architectures list and ban you from downloading it.)

The worst part is that I can't even go back.  The last version, which should be
GCC 4.7.0, is still installed.  It can print out the version information, but
attempting to compile a program results in a link error with LibPPI.  (But this
is probably more of a MacPorts problem than a GCC one, so don't worry about
it.)  I'm totally screwed for now, except for the copy of GCC 4.6 I have lying
around.

(Should I try building GCC 4.7.1 straight from you guys, without going through
MacPorts?)


[Bug driver/53883] GCC 4.7.1 doesn't build on Mac OS X 10.4.11 Tiger/PowerPC (32-bit)

2012-07-06 Thread dwalker07 at yahoo dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=53883

--- Comment #1 from Daryle Walker  2012-07-07 
02:20:51 UTC ---
Created attachment 27756
  --> http://gcc.gnu.org/bugzilla/attachment.cgi?id=27756
The log MacPorts left when trying to build GCC 4.7.1.