[Bug target/54222] [avr] Implement fixed-point support

2012-09-17 Thread gjl at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=54222

--- Comment #7 from Georg-Johann Lay gjl at gcc dot gnu.org 2012-09-17 
07:59:34 UTC ---
Author: gjl
Date: Mon Sep 17 07:59:29 2012
New Revision: 191376

URL: http://gcc.gnu.org/viewcvs?root=gccview=revrev=191376
Log:
PR target/54222
* config/avr/avr.c (avr_out_plus_symbol): Fix typo if PLUS and PSImode.
(avr_out_plus_1): Remove log comments from assembler output.


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


[Bug middle-end/54605] [4.8 Regression] MIPS64 ICEs while building libgfortran for n32

2012-09-17 Thread pinskia at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=54605

Andrew Pinski pinskia at gcc dot gnu.org changed:

   What|Removed |Added

 Status|UNCONFIRMED |RESOLVED
 Resolution||FIXED

--- Comment #3 from Andrew Pinski pinskia at gcc dot gnu.org 2012-09-17 
08:02:12 UTC ---
Yes that fixed it.


[Bug debug/54595] [4.8 Regression] symbol causes a section type conflict with itself with -O -g -fdata-section

2012-09-17 Thread rguenth at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=54595

Richard Guenther rguenth at gcc dot gnu.org changed:

   What|Removed |Added

   Target Milestone|--- |4.8.0


[Bug rtl-optimization/54592] [4.8 Regression] Cannot fuse SSE move and add together

2012-09-17 Thread rguenth at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=54592

Richard Guenther rguenth at gcc dot gnu.org changed:

   What|Removed |Added

 Target||x86_64-*-*
 Status|UNCONFIRMED |NEW
   Keywords||missed-optimization
   Last reconfirmed||2012-09-17
  Component|tree-optimization   |rtl-optimization
 Ever Confirmed|0   |1
Summary|[4.8 Regression]|[4.8 Regression] Cannot
   |[missed-optimization]   |fuse SSE move and add
   |Cannot fuse SSE move and|together
   |add together|
   Target Milestone|--- |4.8.0

--- Comment #1 from Richard Guenther rguenth at gcc dot gnu.org 2012-09-17 
08:46:24 UTC ---
Confirmed.  Must be combine's wrong-doing.


[Bug target/54589] struct offset add should be folded into address calculation

2012-09-17 Thread rguenth at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=54589

Richard Guenther rguenth at gcc dot gnu.org changed:

   What|Removed |Added

 Target||x86_64-*-*, i?86-*-*
 Status|UNCONFIRMED |NEW
   Keywords||missed-optimization
   Last reconfirmed||2012-09-17
  Component|tree-optimization   |target
 Ever Confirmed|0   |1
Summary|[missed-optimization]   |struct offset add should be
   |struct offset add should be |folded into address
   |folded into address |calculation
   |calculation |
  Known to fail||4.6.3, 4.7.2, 4.8.0

--- Comment #1 from Richard Guenther rguenth at gcc dot gnu.org 2012-09-17 
08:49:25 UTC ---
As there is no loop involved it is RTL fwprop or combines job to eventually
do this.  I see

func:
.LFB517:
.cfi_startproc
movzbl  (%rsi), %eax
addq$1, %rax
salq$4, %rax
movl(%rdi,%rax), %eax
movl%eax, (%rdx)
ret

for both 4.7 and 4.8.  i?86 is even worse.


[Bug c/54582] gap in FORTIFY checking of buffer lengths

2012-09-17 Thread rguenth at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=54582

Richard Guenther rguenth at gcc dot gnu.org changed:

   What|Removed |Added

 Status|UNCONFIRMED |NEW
   Last reconfirmed||2012-09-17
 Ever Confirmed|0   |1

--- Comment #1 from Richard Guenther rguenth at gcc dot gnu.org 2012-09-17 
08:51:29 UTC ---
Confirmed.


[Bug c++/54604] ICE (segv) calling member function template in a lambda

2012-09-17 Thread rguenth at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=54604

Richard Guenther rguenth at gcc dot gnu.org changed:

   What|Removed |Added

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

--- Comment #1 from Richard Guenther rguenth at gcc dot gnu.org 2012-09-17 
08:53:25 UTC ---
Fixed for 4.7.2.


[Bug target/54564] [4.8 Regression] Broken __builtin_ia32_vfmadds[sd]3

2012-09-17 Thread jakub at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=54564

--- Comment #9 from Jakub Jelinek jakub at gcc dot gnu.org 2012-09-17 
09:16:47 UTC ---
Author: jakub
Date: Mon Sep 17 09:16:39 2012
New Revision: 191377

URL: http://gcc.gnu.org/viewcvs?root=gccview=revrev=191377
Log:
PR target/54564
ChangeLog entry fixup

Modified:
trunk/gcc/ChangeLog
trunk/gcc/testsuite/ChangeLog


[Bug target/54589] struct offset add should be folded into address calculation

2012-09-17 Thread sgunderson at bigfoot dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=54589

--- Comment #2 from sgunderson at bigfoot dot com 2012-09-17 09:18:16 UTC ---
FWIW, in my original code, func() is a part of a loop body (it keeps reading
values from src in a loop). It doesn't really change anything in the generated
code, though.


[Bug middle-end/54563] [4.7/4.8 Regression] ICE in redirect_eh_edge_1, at tree-eh.c:2215

2012-09-17 Thread jakub at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=54563

--- Comment #9 from Jakub Jelinek jakub at gcc dot gnu.org 2012-09-17 
09:18:44 UTC ---
Author: jakub
Date: Mon Sep 17 09:18:35 2012
New Revision: 191378

URL: http://gcc.gnu.org/viewcvs?root=gccview=revrev=191378
Log:
PR tree-optimization/54563
* tree-ssa-math-opts.c (execute_cse_sincos): Call
gimple_purge_dead_eh_edges if last call has been changed.

* g++.dg/torture/pr54563.C: New test.

Added:
trunk/gcc/testsuite/g++.dg/torture/pr54563.C
Modified:
trunk/gcc/ChangeLog
trunk/gcc/testsuite/ChangeLog
trunk/gcc/tree-ssa-math-opts.c


[Bug middle-end/54563] [4.7 Regression] ICE in redirect_eh_edge_1, at tree-eh.c:2215

2012-09-17 Thread jakub at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=54563

Jakub Jelinek jakub at gcc dot gnu.org changed:

   What|Removed |Added

  Known to work||4.8.0
Summary|[4.7/4.8 Regression] ICE in |[4.7 Regression] ICE in
   |redirect_eh_edge_1, at  |redirect_eh_edge_1, at
   |tree-eh.c:2215  |tree-eh.c:2215
  Known to fail|4.8.0   |

--- Comment #10 from Jakub Jelinek jakub at gcc dot gnu.org 2012-09-17 
09:25:51 UTC ---
Fixed on the trunk so far.


[Bug rtl-optimization/54592] [4.8 Regression] Cannot fuse SSE move and add together

2012-09-17 Thread jakub at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=54592

Jakub Jelinek jakub at gcc dot gnu.org changed:

   What|Removed |Added

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

--- Comment #2 from Jakub Jelinek jakub at gcc dot gnu.org 2012-09-17 
10:08:50 UTC ---
This regressed with http://gcc.gnu.org/viewcvs?root=gccview=revrev=189026


[Bug fortran/54599] Issues found in gfortran by the Coverity Scan

2012-09-17 Thread burnus at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=54599

Tobias Burnus burnus at gcc dot gnu.org changed:

   What|Removed |Added

 CC||burnus at gcc dot gnu.org

--- Comment #2 from Tobias Burnus burnus at gcc dot gnu.org 2012-09-17 
12:08:06 UTC ---
I forgot to put the PR in the ChangeLog, when I fixed some of the issues; see:
http://gcc.gnu.org/viewcvs?view=revisionrevision=191381

Still to do
- dependency.c (both issues of comment 1 and the one of comment 2)
- interface.c: gfc_compare_derived_types
- openmp.c
- cpp.c

and possibly the two RFC for resolve.c and intrinsic.c


[Bug lto/54598] ICE: Segmentation fault in lto1 at tree-streamer-in.c:unpack_ts_fixed_cst_value_fields()

2012-09-17 Thread rguenth at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=54598

Richard Guenther rguenth at gcc dot gnu.org changed:

   What|Removed |Added

 Status|UNCONFIRMED |NEW
   Last reconfirmed||2012-09-17
 CC||rguenth at gcc dot gnu.org
 Ever Confirmed|0   |1

--- Comment #1 from Richard Guenther rguenth at gcc dot gnu.org 2012-09-17 
12:23:56 UTC ---
Confirmed.  Fix:

Index: gcc/tree-streamer-in.c
===
--- gcc/tree-streamer-in.c  (revision 191376)
+++ gcc/tree-streamer-in.c  (working copy)
@@ -172,12 +172,11 @@ unpack_ts_real_cst_value_fields (struct
 static void
 unpack_ts_fixed_cst_value_fields (struct bitpack_d *bp, tree expr)
 {
-  struct fixed_value fv;
-
-  fv.mode = bp_unpack_enum (bp, machine_mode, MAX_MACHINE_MODE);
-  fv.data.low = bp_unpack_var_len_int (bp);
-  fv.data.high = bp_unpack_var_len_int (bp);
-  TREE_FIXED_CST (expr) = fv;
+  FIXED_VALUE_TYPE *fp = ggc_alloc_fixed_value ();
+  fp-mode = bp_unpack_enum (bp, machine_mode, MAX_MACHINE_MODE);
+  fp-data.low = bp_unpack_var_len_int (bp);
+  fp-data.high = bp_unpack_var_len_int (bp);
+  TREE_FIXED_CST_PTR (expr) = fp;
 }



please test it, patch pre-approved if it works (it works for the testcase
with a cross).


[Bug fortran/54603] [F03] Wrong code with structure constructor for proc-pointer components

2012-09-17 Thread burnus at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=54603

--- Comment #4 from Tobias Burnus burnus at gcc dot gnu.org 2012-09-17 
12:30:29 UTC ---
Author: burnus
Date: Mon Sep 17 12:30:16 2012
New Revision: 191382

URL: http://gcc.gnu.org/viewcvs?root=gccview=revrev=191382
Log:
2012-09-17  Tobias Burnus  bur...@net-b.de

PR fortran/54603
* trans-expr.c (gfc_trans_subcomponent_assign): Handle
proc-pointer components.

2012-09-17  Tobias Burnus  bur...@net-b.de

PR fortran/54603
* gfortran.dg/structure_constructor_11.f90: New.


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


[Bug fortran/54603] [F03] Wrong code with structure constructor for proc-pointer components

2012-09-17 Thread burnus at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=54603

Tobias Burnus burnus at gcc dot gnu.org changed:

   What|Removed |Added

 Status|NEW |RESOLVED
 CC||burnus at gcc dot gnu.org
 Resolution||FIXED

--- Comment #5 from Tobias Burnus burnus at gcc dot gnu.org 2012-09-17 
12:34:27 UTC ---
FIXED on the trunk (4.8).

Thanks for your report (and to your colleague for triggering the bug ;-).


[Bug fortran/54285] [F03] Calling a PPC with proc-ptr result

2012-09-17 Thread janus at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=54285

--- Comment #4 from janus at gcc dot gnu.org 2012-09-17 12:50:40 UTC ---
Author: janus
Date: Mon Sep 17 12:50:34 2012
New Revision: 191383

URL: http://gcc.gnu.org/viewcvs?root=gccview=revrev=191383
Log:
2012-09-17  Janus Weil  ja...@gcc.gnu.org

PR fortran/54285
* expr.c (gfc_check_pointer_assign): Correctly handle procedure pointers
as function results.
* primary.c (gfc_match_varspec): Allow to call a PPC with proc-ptr
result.

2012-09-17  Janus Weil  ja...@gcc.gnu.org

PR fortran/54285
* gfortran.dg/proc_ptr_result_7.f90: New.

Added:
trunk/gcc/testsuite/gfortran.dg/proc_ptr_result_7.f90
Modified:
trunk/gcc/fortran/ChangeLog
trunk/gcc/fortran/expr.c
trunk/gcc/fortran/primary.c
trunk/gcc/testsuite/ChangeLog


[Bug fortran/54285] [F03] Calling a PPC with proc-ptr result

2012-09-17 Thread janus at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=54285

janus at gcc dot gnu.org changed:

   What|Removed |Added

 Status|ASSIGNED|RESOLVED
 Resolution||FIXED

--- Comment #5 from janus at gcc dot gnu.org 2012-09-17 12:52:27 UTC ---
Fixed on 4.8 trunk with r191383. Closing.


[Bug libstdc++/54606] New: reference assignment failing/points at previous object

2012-09-17 Thread gcc at gyw dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=54606

 Bug #: 54606
   Summary: reference assignment failing/points at previous object
Classification: Unclassified
   Product: gcc
   Version: 4.6.1
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: libstdc++
AssignedTo: unassig...@gcc.gnu.org
ReportedBy: g...@gyw.com


Created attachment 28203
  -- http://gcc.gnu.org/bugzilla/attachment.cgi?id=28203
Sample code

When one assigns a reference to a variable, the value doesn't point at the new
object. It keeps referring to the previous object.
A a = X;
a.a(); // calls X::a()
a = Y;
a.a(); // Still calls X::a(), not Y::a().

Corresponding code using pointers works. References and pointers should handle
dynamic dispatch the same way. 

Tried g++ 4.4, 4.5 and 4.6 on Ubuntu and Debian.


[Bug c++/54606] reference assignment failing/points at previous object

2012-09-17 Thread paolo.carlini at oracle dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=54606

Paolo Carlini paolo.carlini at oracle dot com changed:

   What|Removed |Added

 Status|UNCONFIRMED |RESOLVED
  Component|libstdc++   |c++
 Resolution||INVALID

--- Comment #1 from Paolo Carlini paolo.carlini at oracle dot com 2012-09-17 
14:13:28 UTC ---
References cannot be assigned in C++, your code just triggers undefined
behavior.


[Bug c++/54601] AIX uses atexit which causes unloading of shared modules to break

2012-09-17 Thread pedzsan at gmail dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=54601

--- Comment #4 from Perry Smith pedzsan at gmail dot com 2012-09-17 14:18:34 
UTC ---
(In reply to comment #3)
 To be included the patch needs to be against trunk.

I don't mind trying to redo this against trunk but I need some help learning
how to build against the trunk.  I'm assume it is documented somewhere but I
don't know where.  I looked (e.g. site:gcc.gnu.org/onlinedocs build trunk)
doesn't hit anything useful.  The pdf does not have autoconf nor automake
which I'm sure are needed.  So I got stumped.  Sorry.


[Bug target/54607] New: [avr]: Canadian cross build fails because gen-avr-mmcu-texi.c is compiled with the wrong compiler

2012-09-17 Thread gjl at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=54607

 Bug #: 54607
   Summary: [avr]: Canadian cross build fails because
gen-avr-mmcu-texi.c is compiled with the wrong
compiler
Classification: Unclassified
   Product: gcc
   Version: 4.8.0
Status: UNCONFIRMED
  Keywords: build
  Severity: normal
  Priority: P3
 Component: target
AssignedTo: g...@gcc.gnu.org
ReportedBy: g...@gcc.gnu.org
  Host: i386-pc-mingw32
Target: avr
 Build: i686-pc-linux-gnu


./gcc/config/avr/gen-avr-mmcu-texi.c must be compiled with the native
build-build compiler, not with the build-host cross compiler.


[Bug target/54607] [avr]: Canadian cross build fails because gen-avr-mmcu-texi.c is compiled with the wrong compiler

2012-09-17 Thread gjl at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=54607

--- Comment #1 from Georg-Johann Lay gjl at gcc dot gnu.org 2012-09-17 
15:22:56 UTC ---
Author: gjl
Date: Mon Sep 17 15:22:37 2012
New Revision: 191390

URL: http://gcc.gnu.org/viewcvs?root=gccview=revrev=191390
Log:
PR target/54607
* config.gcc (tm_file,avr): Add avr/avr-arch.h.
* config/avr/t-avr (gen-avr-mmcu-texi): Use CC_FOR_BUILD to
compile.  Don't depend on TM_H.  Use CFLAGS_FOR_BUILD.
* config/avr/avr.h (avr_arch, base_arch_s, mcu_type_s): Source out
to...
* config/avr/avr-arch.h: ...this new file.
* config/avr/gen-avr-mmcu-texi.c: Include avr-arch.h, stdio.h,
stdlib.h.
* comparator: Make letters smaller than digits.
* config/avr/avr-devices.c: Don't include headers if used in
gen-avr-mmcu-texi.c.
* doc/avr-mmcu.texi: Regenerate.


Added:
trunk/gcc/config/avr/avr-arch.h
Modified:
trunk/gcc/ChangeLog
trunk/gcc/config.gcc
trunk/gcc/config/avr/avr-devices.c
trunk/gcc/config/avr/avr.h
trunk/gcc/config/avr/gen-avr-mmcu-texi.c
trunk/gcc/config/avr/t-avr
trunk/gcc/doc/avr-mmcu.texi


[Bug fortran/54608] New: Wrong-code with SCAN and VERIFY

2012-09-17 Thread burnus at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=54608

 Bug #: 54608
   Summary: Wrong-code with SCAN and VERIFY
Classification: Unclassified
   Product: gcc
   Version: 4.8.0
Status: UNCONFIRMED
  Keywords: wrong-code
  Severity: normal
  Priority: P3
 Component: fortran
AssignedTo: unassig...@gcc.gnu.org
ReportedBy: bur...@gcc.gnu.org


Reported by James Van Buskirk in
https://groups.google.com/forum/?fromgroups=#!topic/comp.lang.fortran/5eAz5ns6AG0

Simplifing SCAN and VERIFY doesn't properly take the BACK= argument into
account if it is not constant. Solution: Do the same as for INDEX, namely:

--- a/gcc/fortran/simplify.c
+++ b/gcc/fortran/simplify.c
@@ -5249,3 +5249,4 @@ gfc_simplify_scan (gfc_expr *e, gfc_expr *c, gfc_expr *b,
gfc_expr *kind)

-  if (e-expr_type != EXPR_CONSTANT || c-expr_type != EXPR_CONSTANT)
+  if (e-expr_type != EXPR_CONSTANT || c-expr_type != EXPR_CONSTANT
+  || ( b != NULL  b-expr_type !=  EXPR_CONSTANT))
 return NULL;
@@ -6337,3 +6338,4 @@ gfc_simplify_verify (gfc_expr *s, gfc_expr *set, gfc_expr
*b, gfc_expr *kind)

-  if (s-expr_type != EXPR_CONSTANT || set-expr_type != EXPR_CONSTANT)
+  if (s-expr_type != EXPR_CONSTANT || set-expr_type != EXPR_CONSTANT
+  || ( b != NULL  b-expr_type !=  EXPR_CONSTANT))
 return NULL;


Test case (should print .true.):

module m1
   implicit none
   contains
  subroutine s1(A)
 logical A
 integer iscan, iverify
 character(7), parameter :: tf(2) = ['.FALSE.','.TRUE. ']

 iscan = scan('AA','A',back=A)
 iverify = verify('xx','A',back=A)
 write(*,'(a)') 'SCAN test: A = '//trim(tf(iscan))
 write(*,'(a)') 'VERIFY test: A = '//trim(tf(iverify))
  end subroutine s1
end module m1

program p1
   use m1
   implicit none
   logical B

   B = .TRUE.
   call s1(B)
end program p1


[Bug c++/54575] [4.8 Regression] ICE with std::vector::insert and -std=c++11

2012-09-17 Thread paolo.carlini at oracle dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=54575

Paolo Carlini paolo.carlini at oracle dot com changed:

   What|Removed |Added

   Priority|P3  |P2

--- Comment #9 from Paolo Carlini paolo.carlini at oracle dot com 2012-09-17 
15:28:38 UTC ---
Jason, I'm bumping this to P2, it affects pretty badly the library too.


[Bug c++/53661] [gcc-4.7/4.8 regression] Wrong narrowing conversion warning with -std=c++11

2012-09-17 Thread jason at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=53661

--- Comment #10 from Jason Merrill jason at gcc dot gnu.org 2012-09-17 
15:42:41 UTC ---
(In reply to comment #9)
 7.2p7 starts as For an enumeration whose underlying type is
 fixed,, so does not apply.

That's just the first sentence; the rest of p7 does apply.


[Bug target/54607] [avr]: Canadian cross build fails because gen-avr-mmcu-texi.c is compiled with the wrong compiler

2012-09-17 Thread gjl at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=54607

Georg-Johann Lay gjl at gcc dot gnu.org changed:

   What|Removed |Added

   Priority|P3  |P5
 Status|UNCONFIRMED |RESOLVED
 Resolution||FIXED
   Target Milestone|--- |4.8.0

--- Comment #2 from Georg-Johann Lay gjl at gcc dot gnu.org 2012-09-17 
15:43:30 UTC ---
Done.


[Bug lto/54598] ICE: Segmentation fault in lto1 at tree-streamer-in.c:unpack_ts_fixed_cst_value_fields()

2012-09-17 Thread gjl at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=54598

--- Comment #2 from Georg-Johann Lay gjl at gcc dot gnu.org 2012-09-17 
16:03:53 UTC ---
Author: gjl
Date: Mon Sep 17 16:03:44 2012
New Revision: 191394

URL: http://gcc.gnu.org/viewcvs?root=gccview=revrev=191394
Log:
PR lto/54598
* tree-streamer-in.c (unpack_ts_real_cst_value_fields): Use ggc'ed
FIXED_VALUE_TYPE instead of struct fixed_value.


Modified:
trunk/gcc/ChangeLog
trunk/gcc/tree-streamer-in.c


[Bug c++/53661] [gcc-4.7/4.8 regression] Wrong narrowing conversion warning with -std=c++11

2012-09-17 Thread jason at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=53661

--- Comment #11 from Jason Merrill jason at gcc dot gnu.org 2012-09-17 
16:06:10 UTC ---
Author: jason
Date: Mon Sep 17 16:06:03 2012
New Revision: 191395

URL: http://gcc.gnu.org/viewcvs?root=gccview=revrev=191395
Log:
PR c++/53661
* typeck2.c (check_narrowing): Avoid false positives on conversion
from enumeral type.

Added:
trunk/gcc/testsuite/g++.dg/init/aggr9.C
Modified:
trunk/gcc/cp/ChangeLog
trunk/gcc/cp/typeck2.c
trunk/gcc/testsuite/ChangeLog


[Bug lto/54598] ICE: Segmentation fault in lto1 at tree-streamer-in.c:unpack_ts_fixed_cst_value_fields()

2012-09-17 Thread gjl at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=54598

Georg-Johann Lay gjl at gcc dot gnu.org changed:

   What|Removed |Added

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

--- Comment #3 from Georg-Johann Lay gjl at gcc dot gnu.org 2012-09-17 
16:14:42 UTC ---
Fixed.

Verified against the test case from attachment 28199 and the more complicated
test cases in

gcc.target/avr/torture/avr-torture/sat-*.c


[Bug c++/53661] [gcc-4.7/4.8 regression] Wrong narrowing conversion warning with -std=c++11

2012-09-17 Thread harald at gigawatt dot nl
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=53661

--- Comment #12 from Harald van Dijk harald at gigawatt dot nl 2012-09-17 
16:25:09 UTC ---
Oops, quite right, sorry about that.


[Bug c++/53661] [gcc-4.7/4.8 regression] Wrong narrowing conversion warning with -std=c++11

2012-09-17 Thread jason at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=53661

--- Comment #13 from Jason Merrill jason at gcc dot gnu.org 2012-09-17 
16:41:49 UTC ---
Author: jason
Date: Mon Sep 17 16:41:41 2012
New Revision: 191398

URL: http://gcc.gnu.org/viewcvs?root=gccview=revrev=191398
Log:
PR c++/53661
* typeck2.c (check_narrowing): Avoid false positives on conversion
from enumeral type.

Added:
branches/gcc-4_7-branch/gcc/testsuite/g++.dg/init/aggr9.C
Modified:
branches/gcc-4_7-branch/gcc/cp/ChangeLog
branches/gcc-4_7-branch/gcc/cp/typeck2.c
branches/gcc-4_7-branch/gcc/testsuite/ChangeLog


[Bug c++/53661] [gcc-4.7/4.8 regression] Wrong narrowing conversion warning with -std=c++11

2012-09-17 Thread jason at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=53661

Jason Merrill jason at gcc dot gnu.org changed:

   What|Removed |Added

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

--- Comment #13 from Jason Merrill jason at gcc dot gnu.org 2012-09-17 
16:41:49 UTC ---
Author: jason
Date: Mon Sep 17 16:41:41 2012
New Revision: 191398

URL: http://gcc.gnu.org/viewcvs?root=gccview=revrev=191398
Log:
PR c++/53661
* typeck2.c (check_narrowing): Avoid false positives on conversion
from enumeral type.

Added:
branches/gcc-4_7-branch/gcc/testsuite/g++.dg/init/aggr9.C
Modified:
branches/gcc-4_7-branch/gcc/cp/ChangeLog
branches/gcc-4_7-branch/gcc/cp/typeck2.c
branches/gcc-4_7-branch/gcc/testsuite/ChangeLog

--- Comment #14 from Jason Merrill jason at gcc dot gnu.org 2012-09-17 
16:42:44 UTC ---
Fixed for 4.7.2.


[Bug c++/53661] [gcc-4.7/4.8 regression] Wrong narrowing conversion warning with -std=c++11

2012-09-17 Thread jason at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=53661

Jason Merrill jason at gcc dot gnu.org changed:

   What|Removed |Added

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

--- Comment #14 from Jason Merrill jason at gcc dot gnu.org 2012-09-17 
16:42:44 UTC ---
Fixed for 4.7.2.


[Bug bootstrap/54609] New: libbacktrace breaks bootstrap using clang

2012-09-17 Thread howarth at nitro dot med.uc.edu
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=54609

 Bug #: 54609
   Summary: libbacktrace breaks bootstrap using clang
Classification: Unclassified
   Product: gcc
   Version: 4.8.0
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: bootstrap
AssignedTo: unassig...@gcc.gnu.org
ReportedBy: howa...@nitro.med.uc.edu


The bootstrap of gcc trunk at r191397 is broken when clang is used as the
system compiler on x86_64-apple-darwin12...

libtool: compile:  gcc -DHAVE_CONFIG_H -I.
-I../../gcc-4.8-20120917/libbacktrace -W -Wall -Wwrite-strings
-Wstrict-prototypes -Wmissing-prototypes -Wold-style-definition
-Wmissing-format-attribute -Wcast-qual -Werror -I
../../gcc-4.8-20120917/libbacktrace/../include -I ../libgcc -g -MT unknown.lo
-MD -MP -MF .deps/unknown.Tpo -c ../../gcc-4.8-20120917/libbacktrace/unknown.c
-o unknown.o
../../gcc-4.8-20120917/libbacktrace/unknown.c:45:46: error: parameter name
omitted
  backtrace_error_callback ATTRIBUTE_UNUSED,
   ^
../../gcc-4.8-20120917/libbacktrace/unknown.c:56:1: error: conflicting types
for 'backtrace_initialize'
backtrace_initialize (int descriptor ATTRIBUTE_UNUSED,
^
../../gcc-4.8-20120917/libbacktrace/internal.h:212:12: note: previous
declaration is here
extern int backtrace_initialize (struct backtrace_state *state,
   ^
../../gcc-4.8-20120917/libbacktrace/unknown.c:61:16: error: incompatible
pointer types assigning to 'fileline' (aka 'int (*)(struct backtrace_state *,
uintptr_t, backtrace_full_callback,
  backtrace_error_callback, void *)') from 'int (void *, uintptr_t,
backtrace_full_callback, backtrace_error_callback, void *)'
[-Werror,-Wincompatible-pointer-types]
  *fileline_fn = unknown_fileline;
   ^ 
3 errors generated.
yes
make[4]: *** [unknown.lo] Error 1
make[4]: *** Waiting for unfinished jobs


[Bug bootstrap/54609] libbacktrace breaks bootstrap on darwin

2012-09-17 Thread howarth at nitro dot med.uc.edu
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=54609

Jack Howarth howarth at nitro dot med.uc.edu changed:

   What|Removed |Added

Summary|libbacktrace breaks |libbacktrace breaks
   |bootstrap using clang   |bootstrap on darwin

--- Comment #1 from Jack Howarth howarth at nitro dot med.uc.edu 2012-09-17 
17:08:41 UTC ---
This bootstrap failure also occurs when FSF gcc 4.7.2 svn is used...

libtool: compile:  gcc-fsf-4.7 -DHAVE_CONFIG_H -I.
-I../../gcc-4.8-20120917/libbacktrace -W -Wall -Wwrite-strings
-Wstrict-prototypes -Wmissing-prototypes -Wold-style-definition
-Wmissing-format-attribute -Wcast-qual -Werror -I
../../gcc-4.8-20120917/libbacktrace/../include -I ../libgcc -g -MT unknown.lo
-MD -MP -MF .deps/unknown.Tpo -c ../../gcc-4.8-20120917/libbacktrace/unknown.c
-o unknown.o
../../gcc-4.8-20120917/libbacktrace/unknown.c: In function 'unknown_fileline':
../../gcc-4.8-20120917/libbacktrace/unknown.c:45:5: error: parameter name
omitted
../../gcc-4.8-20120917/libbacktrace/unknown.c: At top level:
../../gcc-4.8-20120917/libbacktrace/unknown.c:56:1: error: conflicting types
for 'backtrace_initialize'
In file included from ../../gcc-4.8-20120917/libbacktrace/unknown.c:38:0:
../../gcc-4.8-20120917/libbacktrace/internal.h:212:12: note: previous
declaration of 'backtrace_initialize' was here
../../gcc-4.8-20120917/libbacktrace/unknown.c: In function
'backtrace_initialize':
../../gcc-4.8-20120917/libbacktrace/unknown.c:61:16: error: assignment from
incompatible pointer type [-Werror]
cc1: all warnings being treated as errors
checking for sigsetmask... config.status: creating Makefile
make[4]: *** [unknown.lo] Error 1
make[4]: *** Waiting for unfinished jobs

so it appears to be general to darwin.


[Bug bootstrap/54609] libbacktrace breaks bootstrap on darwin

2012-09-17 Thread howarth at nitro dot med.uc.edu
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=54609

--- Comment #2 from Jack Howarth howarth at nitro dot med.uc.edu 2012-09-17 
17:19:35 UTC ---
 ../gcc-4.8-20120917/configure --prefix=/sw --prefix=/sw/lib/gcc4.8
--mandir=/sw/share/man --infodir=/sw/lib/gcc4.8/info
--enable-languages=c,c++,fortran,lto,objc,obj-c++,java --with-gmp=/sw
--with-libiconv-prefix=/sw --with-isl=/sw --with-cloog=/sw --with-mpc=/sw
--with-system-zlib --enable-checking=yes --x-includes=/usr/X11R6/include
--x-libraries=/usr/X11R6/lib --program-suffix=-fsf-4.8


[Bug bootstrap/54609] libbacktrace breaks bootstrap on darwin

2012-09-17 Thread howarth at nitro dot med.uc.edu
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=54609

--- Comment #3 from Jack Howarth howarth at nitro dot med.uc.edu 2012-09-17 
17:31:40 UTC ---
Created attachment 28204
  -- http://gcc.gnu.org/bugzilla/attachment.cgi?id=28204
preprocessed source for libbacktrace/unknown.c on x86_64-apple-darwin12

Generated with...

gcc-fsf-4.7 -DHAVE_CONFIG_H -I. -I../../gcc-4.8-20120917/libbacktrace -W -Wall
-Wwrite-strings -Wstrict-prototypes -Wmissing-prototypes -Wold-style-definition
-Wmissing-format-attribute -Wcast-qual -Werror -I
../../gcc-4.8-20120917/libbacktrace/../include -I ../libgcc -g -MT unknown.lo
-MD -MP -MF .deps/unknown.Tpo -c ../../gcc-4.8-20120917/libbacktrace/unknown.c
-o unknown.o --save-temps


[Bug tree-optimization/54610] New: [4.8 Regression] FAIL: gcc.dg/tree-ssa/forwprop-22.c (internal compiler error) on x86 AVX targets

2012-09-17 Thread ubizjak at gmail dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=54610

 Bug #: 54610
   Summary: [4.8 Regression] FAIL: gcc.dg/tree-ssa/forwprop-22.c
(internal compiler error) on x86 AVX targets
Classification: Unclassified
   Product: gcc
   Version: 4.8.0
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: tree-optimization
AssignedTo: unassig...@gcc.gnu.org
ReportedBy: ubiz...@gmail.com
Target: x86


Recent regression:

~/gcc-build-fast/gcc/cc1 -O -mavx forwprop-22.c 
 f
Analyzing compilation unit
Performing interprocedural optimizations
 *free_lang_data visibility early_local_cleanups
forwprop-22.c: In function ‘f’:
forwprop-22.c:14:1: error: vectors with different element number found in
vector permute expression
 }
 ^
vec
vec
vec
vector(4) long long unsigned int
t1_7 = VEC_PERM_EXPR x_15, x_15, { 1, 0, vec,  Unknown tree: H�6�
 };

forwprop-22.c:14:1: internal compiler error: verify_gimple failed
Please submit a full bug report,
with preprocessed source if appropriate.
See http://gcc.gnu.org/bugs.html for instructions.

(gdb) bt
#0  internal_error (gmsgid=0xe0d7f8 verify_gimple failed) at
../../gcc-svn/trunk/gcc/diagnostic.c:951
#1  0x008d442d in verify_gimple_in_cfg (fn=0x719ac140) at
../../gcc-svn/trunk/gcc/tree-cfg.c:4659
#2  0x00812f45 in execute_function_todo (data=optimized out) at
../../gcc-svn/trunk/gcc/passes.c:1801
#3  0x0081393e in execute_todo (flags=2054) at
../../gcc-svn/trunk/gcc/passes.c:1834
#4  0x0081644e in execute_one_pass (pass=pass@entry=0x13380c0) at
../../gcc-svn/trunk/gcc/passes.c:2180
#5  0x008167d5 in execute_pass_list (pass=0x13380c0) at
../../gcc-svn/trunk/gcc/passes.c:2212
#6  0x008167e7 in execute_pass_list (pass=0x1335d80) at
../../gcc-svn/trunk/gcc/passes.c:2213
#7  0x0081593d in do_per_function_toporder
(callback=callback@entry=0x8167c0 execute_pass_list(opt_pass*),
data=0x1337a60)
at ../../gcc-svn/trunk/gcc/passes.c:1704
#8  0x00816d76 in execute_ipa_pass_list (pass=0x1335d20) at
../../gcc-svn/trunk/gcc/passes.c:2523
#9  0x0061dbb0 in ipa_passes () at
../../gcc-svn/trunk/gcc/cgraphunit.c:1838
#10 compile () at ../../gcc-svn/trunk/gcc/cgraphunit.c:1961


[Bug tree-optimization/54610] [4.8 Regression] FAIL: gcc.dg/tree-ssa/forwprop-22.c (internal compiler error) on x86 AVX targets

2012-09-17 Thread ubizjak at gmail dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=54610

Uros Bizjak ubizjak at gmail dot com changed:

   What|Removed |Added

 CC||glisse at gcc dot gnu.org

--- Comment #1 from Uros Bizjak ubizjak at gmail dot com 2012-09-17 17:34:29 
UTC ---
Adding CC.


[Bug c++/54604] ICE (segv) calling member function template in a lambda

2012-09-17 Thread delong.j at fb dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=54604

--- Comment #2 from Jordan DeLong delong.j at fb dot com 2012-09-17 17:35:34 
UTC ---
Thanks!


[Bug bootstrap/54609] libbacktrace breaks bootstrap on darwin

2012-09-17 Thread ian at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=54609

--- Comment #4 from ian at gcc dot gnu.org ian at gcc dot gnu.org 2012-09-17 
17:43:32 UTC ---
Author: ian
Date: Mon Sep 17 17:43:26 2012
New Revision: 191402

URL: http://gcc.gnu.org/viewcvs?root=gccview=revrev=191402
Log:
PR bootstrap/54609
* unknown.c (unknown_fileline): Add state parameter, remove
fileline_data parameter, name error_callback parameter.
(backtrace_initialize): Add state parameter.

Modified:
trunk/libbacktrace/ChangeLog
trunk/libbacktrace/unknown.c


[Bug bootstrap/54609] libbacktrace breaks bootstrap on darwin

2012-09-17 Thread ian at airs dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=54609

Ian Lance Taylor ian at airs dot com changed:

   What|Removed |Added

 Status|UNCONFIRMED |RESOLVED
 CC||ian at airs dot com
 Resolution||FIXED

--- Comment #5 from Ian Lance Taylor ian at airs dot com 2012-09-17 17:45:24 
UTC ---
Should be fixed now.  Sorry about that.


[Bug fortran/54608] Wrong-code with SCAN and VERIFY

2012-09-17 Thread burnus at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=54608

--- Comment #1 from Tobias Burnus burnus at gcc dot gnu.org 2012-09-17 
17:53:48 UTC ---
Author: burnus
Date: Mon Sep 17 17:53:37 2012
New Revision: 191403

URL: http://gcc.gnu.org/viewcvs?root=gccview=revrev=191403
Log:
2012-09-17  Tobias Burnus  bur...@net-b.de

PR fortran/54608
* simplify.c (gfc_simplify_scan, gfc_simplify_verify):
Fix handling of BACK=variable.

2012-09-17  Tobias Burnus  bur...@net-b.de

PR fortran/54608
* gfortran.dg/scan_2.f90: New.


Added:
trunk/gcc/testsuite/gfortran.dg/scan_2.f90
Modified:
trunk/gcc/fortran/ChangeLog
trunk/gcc/fortran/simplify.c
trunk/gcc/testsuite/ChangeLog


[Bug c++/29234] Call to operator() of temporary object wrongly parsed

2012-09-17 Thread poletti.marco at gmail dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=29234

poletti.marco at gmail dot com changed:

   What|Removed |Added

 CC||poletti.marco at gmail dot
   ||com

--- Comment #4 from poletti.marco at gmail dot com 2012-09-17 17:53:36 UTC ---
Still an issue with GCC 4.7.1.
Clang does not have this issue.


[Bug c++/29234] Call to operator() of temporary object wrongly parsed

2012-09-17 Thread poletti.marco at gmail dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=29234

--- Comment #5 from poletti.marco at gmail dot com 2012-09-17 17:55:54 UTC ---
Still an issue with GCC 4.7.1.
Clang does not have this issue.


[Bug c++/29234] Call to operator() of temporary object wrongly parsed

2012-09-17 Thread poletti.marco at gmail dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=29234

--- Comment #6 from poletti.marco at gmail dot com 2012-09-17 17:57:58 UTC ---
Still an issue with GCC 4.7.1.
Clang does not have this issue.

Yet another example:


struct C {
void operator[](C) {
}
};

void f() {
C x;
(C()[x]);
}


[Bug fortran/54608] Wrong-code with SCAN and VERIFY

2012-09-17 Thread burnus at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=54608

Tobias Burnus burnus at gcc dot gnu.org changed:

   What|Removed |Added

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

--- Comment #2 from Tobias Burnus burnus at gcc dot gnu.org 2012-09-17 
18:00:50 UTC ---
FIXED on the trunk (4.8).


[Bug target/28896] -fstack-limit-symbol and m68k and non 68020

2012-09-17 Thread baker at usgs dot gov
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=28896

--- Comment #30 from Larry Baker baker at usgs dot gov 2012-09-17 19:28:19 
UTC ---
Created attachment 28205
  -- http://gcc.gnu.org/bugzilla/attachment.cgi?id=28205
Build patched Sourcery (Mentor Graphics) CodeBench Lite GCC 4.6-2011.09-23 for
ColdFire uClinux

Shell script to download, patch, and build Sourcery (Mentor Graphics) CodeBench
Lite GCC 4.6-2011.09-23 for ColdFire uClinux target on Linux i386 host.


[Bug bootstrap/54611] New: [4.8 regression] Bootstrap failure: conflicting typ es for 'backtrace_simple'

2012-09-17 Thread gerald at pfeifer dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=54611

 Bug #: 54611
   Summary: [4.8 regression] Bootstrap failure:  conflicting typ
es for 'backtrace_simple'
Classification: Unclassified
   Product: gcc
   Version: unknown
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: bootstrap
AssignedTo: unassig...@gcc.gnu.org
ReportedBy: ger...@pfeifer.com


This is on i386-unknown-freebsd10.0:

/scratch2/tmp/gerald/gcc-HEAD/libbacktrace/nounwind.c:48: warning: no previous
p
rototype for 'backtrace'
/scratch2/tmp/gerald/gcc-HEAD/libbacktrace/nounwind.c:59: error: conflicting
typ
es for 'backtrace_simple'
/scratch2/tmp/gerald/gcc-HEAD/libbacktrace/backtrace.h:130: error: previous
decl
aration of 'backtrace_simple' was here
gmake[4]: *** [nounwind.lo] Error 1
gmake[4]: Leaving directory `/scratch2/tmp/gerald/OBJ-0917-1906/libbacktrace'
gmake[3]: *** [all] Error 2
gmake[3]: Leaving directory `/scratch2/tmp/gerald/OBJ-0917-1906/libbacktrace'
gmake[2]: *** [all-stage1-libbacktrace] Error 2 
gmake[2]: Leaving directory `/scratch2/tmp/gerald/OBJ-0917-1906' 
gmake[1]: *** [stage1-bubble] Error 2 
gmake[1]: Leaving directory `/scratch2/tmp/gerald/OBJ-0917-1906'
gmakr: *** [bootstrap-lean] Error 2


[Bug bootstrap/54611] [4.8 regression] Bootstrap failure: conflicting typ es for 'backtrace_simple'

2012-09-17 Thread gerald at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=54611

--- Comment #1 from gerald at gcc dot gnu.org gerald at gcc dot gnu.org 
2012-09-17 20:57:21 UTC ---
Author: gerald
Date: Mon Sep 17 20:57:16 2012
New Revision: 191405

URL: http://gcc.gnu.org/viewcvs?root=gccview=revrev=191405
Log:
PR bootstrap/54611
* nounwind.c (backtrace_simple): Add state parameter.

Modified:
trunk/libbacktrace/ChangeLog
trunk/libbacktrace/nounwind.c


[Bug bootstrap/54611] [4.8 regression] Bootstrap failure: conflicting types for 'backtrace_simple'

2012-09-17 Thread ian at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=54611

--- Comment #2 from ian at gcc dot gnu.org ian at gcc dot gnu.org 2012-09-17 
21:14:55 UTC ---
Author: ian
Date: Mon Sep 17 21:14:51 2012
New Revision: 191408

URL: http://gcc.gnu.org/viewcvs?root=gccview=revrev=191408
Log:
PR bootstrap/54611
* nounwind.c (backtrace_full): Rename from backtrace.  Add state
parameter.

Modified:
trunk/libbacktrace/ChangeLog
trunk/libbacktrace/nounwind.c


[Bug bootstrap/54611] [4.8 regression] Bootstrap failure: conflicting types for 'backtrace_simple'

2012-09-17 Thread ian at airs dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=54611

Ian Lance Taylor ian at airs dot com changed:

   What|Removed |Added

 Status|UNCONFIRMED |RESOLVED
 CC||ian at airs dot com
 Resolution||FIXED

--- Comment #3 from Ian Lance Taylor ian at airs dot com 2012-09-17 21:16:47 
UTC ---
Fixed.


[Bug debug/54508] Wrong debug information emitted if data members not referenced

2012-09-17 Thread paul_koning at dell dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=54508

--- Comment #2 from Paul Koning paul_koning at dell dot com 2012-09-17 
21:31:29 UTC ---
I just submitted a proposed fix to the gcc-patches list.


[Bug target/28896] -fstack-limit-symbol and m68k and non 68020

2012-09-17 Thread baker at usgs dot gov
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=28896

--- Comment #31 from Larry Baker baker at usgs dot gov 2012-09-17 21:44:34 
UTC ---
Created attachment 28206
  -- http://gcc.gnu.org/bugzilla/attachment.cgi?id=28206
Patches for GCC 4.6.3

Patches to fix stack limit checking for GCC 4.6.3 for FreeScale Coldfire
uClinux.

These patches are also good for the GCC 4.6.4 development trunk (fossies.org
20120907 snapshot).


[Bug c/7652] -Wswitch-break : Warn if a switch case falls through

2012-09-17 Thread alexfh at google dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=7652

Alexander Kornienko alexfh at google dot com changed:

   What|Removed |Added

 CC||alexfh at google dot com

--- Comment #13 from Alexander Kornienko alexfh at google dot com 2012-09-17 
22:00:49 UTC ---
(In reply to comment #12)
 However, I think it's important to note that they implement the very noisy
 behavior of warning for all implicit fall-through. We could make our warning
 much more useful by being silent for empty case statements,
FYI, clang's warning does exactly this, i.e. it doesn't (and never did) warn on
empty case labels. There's also a way to silence this warning in cases where
fallthrough is intended: [[clang::fallthrough]]; construct, which uses custom
C++11 statement attribute clang::fallthrough. There's a doc here:
http://clang.llvm.org/docs/LanguageExtensions.html#clang__fallthrough

In an ideal world, it would be great if GCC had a compatible implementation
using C++11 attributes (except for a namespace of the attribute), or for
example, using a built-in function. So that it was possible to have the same
syntax in source code, at least using a macro. Command-line flags compatibility
would also be nice.

Or if you have any reasonable suggestions on how this diagnostic can be made
better, I'll be glad to discuss this.

 and in light of
 other warnings starting with -Wswitch, I would recommend we name the warning
 -Wswitch-fall-through or something similar. If we want to have an additional
 warning that warns for all fall-through, as clang does, we could also add
 -Wswitch-empty-fall-through.


[Bug target/52483] SH Target: Loads from volatile memory leave redundant sign/zero extensions

2012-09-17 Thread olegendo at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=52483

Oleg Endo olegendo at gcc dot gnu.org changed:

   What|Removed |Added

 CC||olegendo at gcc dot gnu.org

--- Comment #2 from Oleg Endo olegendo at gcc dot gnu.org 2012-09-17 23:05:23 
UTC ---
(In reply to comment #1)
 (In reply to comment #0)
  Maybe a few peepholes would help here?
 
 Sure.  Peephole looks to be reasonable for this.

I've investigated a little bit regarding this issue.  First I tried to beat it
with peepholes, but the actual problem is that in the load/store expanders the
predicates use the 'nonimmediate_operand' and/or 'general_operand' functions
from recog.c, which reject volatile mems, because its 'volatile_ok' var is '0'
during RTL expansion.

As a consequence, only simple single-register addressing modes are allowed for
volatile mems.  Except for displacement address modes, since those have
explicit mem patterns, which would match during expansion.

In recog.c there is a comment:

/* Nonzero means allow operands to be volatile.
   This should be 0 if you are generating rtl, such as if you are calling
   the functions in optabs.c and expmed.c (most of the time).
   This should be 1 if all valid insns need to be recognized,
   such as in reginfo.c and final.c and reload.c.

   init_recog and init_recog_no_volatile are responsible for setting this.  */

int volatile_ok;


And in function.c:

void
expand_function_start (tree subr)
{
  /* Make sure volatile mem refs aren't considered
 valid operands of arithmetic insns.  */
  init_recog_no_volatile ();


If that is the only reason for rejecting volatile mems, then I think it would
be OK to match volatile mems in the load/store expanders for SH, since there
are no arithmetic insns that take mems anyway (except for some GBR byte mem
modification insns, which aren't used in the backend).
Kaz, does this make sense?


[Bug libstdc++/54591] sscanf format no more working

2012-09-17 Thread temp78593 at mutluit dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=54591

Uenal Mutlu temp78593 at mutluit dot com changed:

   What|Removed |Added

 Resolution|INVALID |MOVED

--- Comment #4 from Uenal Mutlu temp78593 at mutluit dot com 2012-09-17 
23:06:02 UTC ---
Ok, just for the record (for those having the same problem) I filed it at the
following URL (glibc bugzilla), and there I also reported a fix:
 http://sourceware.org/bugzilla/show_bug.cgi?id=14586


[Bug target/54089] [SH] Refactor shift patterns

2012-09-17 Thread olegendo at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=54089

--- Comment #18 from Oleg Endo olegendo at gcc dot gnu.org 2012-09-17 
23:29:52 UTC ---
Created attachment 28207
  -- http://gcc.gnu.org/bugzilla/attachment.cgi?id=28207
Arithmetic right shift rework

I have tried to apply the same strategies to the arithmetic right shift
patterns as for logical right/left shift patterns.
What happens then is that combine will see arithmetic right shift patterns (for
shift amounts  1) and will fail to convert arithmetic right shifts to logical
right shifts where it would actually be possible.  This results in bigger code
since arithmetic shifts on SH are more expensive than logical shifts.

Unfortunately, combine will only do the shift type conversion if it can combine
the logical shift with some other insn -- which is not very likely on SH. 
Thus, the logical shift is discarded.  If however, no arithmetic shift pattern
is there that matches the shift amount (which is currently the case), combine
will split out the logical shift.

Not having arithmetic right shift patterns makes it difficult to write combine
patterns for things like ... 

char test (int x)
{
  return x  24;
}

which ends up as:
-m4:
mov#-24,r1
shadr1,r4
rts
exts.br4,r0

-m2:
mov.l.L3,r1
sts.lpr,@-r15
jsr@r1
nop
mov
lds.l@r15+,pr
rts
nop
.L4:
.align 2
.L3:
.long___ashiftrt_r4_24


On the other hand, the following is handled almost as expected:

unsigned char test (int a)
{
  return a  24;
}

-m4:
movr4,r0
shlr16r0
rts
shlr8r0

-m2:
mov.l.L3,r1
sts.lpr,@-r15
jsr@r1
nop
extu.br4,r0
lds.l@r15+,p
rts
nop
.L4:
.align 2
.L3:
.long___ashiftrt_r4_24


According to my understanding, to fix those issues something like the attached
patch would be required.  However, it would also require a separate arithmetic
right shift to logical right shift conversion pass.


libiberty sha1.c: bug in adding 64-bit number to 64-bit number (binutils-2.22.90)

2012-09-17 Thread Geoff Pike
Hello libiberty experts,

I don't see anything saying that sha1_process_block() has a size limit
on its input buffer, and if the length of the buffer is big (e.g.,
2^32 on a 64-bit machine) then this code won't correctly add a 64-bit
number to 64-bit number:

  /* First increment the byte count.  RFC 1321 specifies the possible
 length of the file up to 2^64 bits.  Here we only compute the
 number of bytes.  Do a double word increment.  */
  ctx-total[0] += len;
  if (ctx-total[0]  len)
++ctx-total[1];

The above is at sha1.c around line 302.

regards,

Geoff Pike


[Bug target/28896] -fstack-limit-symbol and m68k and non 68020

2012-09-17 Thread baker at usgs dot gov
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=28896

--- Comment #32 from Larry Baker baker at usgs dot gov 2012-09-18 02:16:32 
UTC ---
Created attachment 28208
  -- http://gcc.gnu.org/bugzilla/attachment.cgi?id=28208
Build patched GNU GCC 4.6.3 for ColdFire uClinux

Shell script to download, patch, and build GNU GCC 4.6.3 for ColdFire uClinux
target on Linux i386 host.


[Bug target/54584] m68k-uclinux error: Link tests are not allowed after GCC_NO_EXECUTABLES

2012-09-17 Thread baker at usgs dot gov
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=54584

--- Comment #2 from Larry Baker baker at usgs dot gov 2012-09-18 02:44:43 UTC 
---
The Sourcery (Mentor Graphics) ColdFire uClinux SDK I use uses binutils-1.21. 
I installed binutils-2.22 and the latest uClinux elf2flt (downloaded 20120730).

$ /usr/local/gcc-4.7.1/bin/m68k-uclinux-ld -V -v
GNU ld (GNU Binutils) 2.22
  Supported emulations:
   m68kelf
GNU ld (GNU Binutils) 2.22

The error message is the same (Nonrepresentable section on output).

I am able to issue the failing command (collect2) outside of make gcc:

$
COMPILER_PATH=/tmp/freescale-coldfile-xgcc/cross-gcc-4.7.1/gcc/:/usr/local/gcc-4.7.1/m68k-uclinux/bin/:/usr/local/gcc-4.7.1/m68k-uclinux/lib/
\
/tmp/freescale-coldfile-xgcc/cross-gcc-4.7.1/gcc/collect2
--sysroot=/tmp/freescale-coldfile-xgcc/freescale-coldfire-2011.09/m68k-uclinux/libc/msep-data
--eh-frame-hdr -elf2flt -o conftest -t
/tmp/freescale-coldfile-xgcc/freescale-coldfire-2011.09/m68k-uclinux/libc/msep-data/usr/lib/crt1.o
/tmp/freescale-coldfile-xgcc/freescale-coldfire-2011.09/m68k-uclinux/libc/msep-data/usr/lib/crti.o
/tmp/freescale-coldfile-xgcc/cross-gcc-4.7.1/gcc/msep-data/crtbegin.o
-L/tmp/freescale-coldfile-xgcc/cross-gcc-4.7.1/gcc/msep-data
-L/usr/local/gcc-4.7.1/m68k-uclinux/lib/msep-data
-L/tmp/freescale-coldfile-xgcc/cross-gcc-4.7.1/gcc
-L/usr/local/gcc-4.7.1/m68k-uclinux/bin -L/usr/local/gcc-4.7.1/m68k-uclinux/lib
-L/tmp/freescale-coldfile-xgcc/freescale-coldfire-2011.09/m68k-uclinux/libc/msep-data/usr/lib
conftest.o -lgcc -lc -lgcc
/tmp/freescale-coldfile-xgcc/cross-gcc-4.7.1/gcc/msep-data/crtend.o
/tmp/freescale-coldfile-xgcc/freescale-coldfire-2011.09/m68k-uclinux/libc/msep-data/usr/lib/crtn.o
/usr/local/gcc-4.7.1/m68k-uclinux/bin/ld.real: mode m68kelf
/tmp/freescale-coldfile-xgcc/freescale-coldfire-2011.09/m68k-uclinux/libc/msep-data/usr/lib/crt1.o
/tmp/freescale-coldfile-xgcc/freescale-coldfire-2011.09/m68k-uclinux/libc/msep-data/usr/lib/crti.o
/tmp/freescale-coldfile-xgcc/cross-gcc-4.7.1/gcc/msep-data/crtbegin.o
conftest.o
(/tmp/freescale-coldfile-xgcc/freescale-coldfire-2011.09/m68k-uclinux/libc/msep-data/usr/lib/libc.a)__uClibc_main.o
(/tmp/freescale-coldfile-xgcc/freescale-coldfire-2011.09/m68k-uclinux/libc/msep-data/usr/lib/libc.a)strrchr.o
(/tmp/freescale-coldfile-xgcc/freescale-coldfire-2011.09/m68k-uclinux/libc/msep-data/usr/lib/libc.a)exit.o
(/tmp/freescale-coldfile-xgcc/freescale-coldfire-2011.09/m68k-uclinux/libc/msep-data/usr/lib/libc.a)_exit.o
(/tmp/freescale-coldfile-xgcc/freescale-coldfire-2011.09/m68k-uclinux/libc/msep-data/usr/lib/libc.a)__errno_location.o
(/tmp/freescale-coldfile-xgcc/freescale-coldfire-2011.09/m68k-uclinux/libc/msep-data/usr/lib/libc.a)strchr.o
(/tmp/freescale-coldfile-xgcc/freescale-coldfire-2011.09/m68k-uclinux/libc/msep-data/usr/lib/libc.a)errno.o
/tmp/freescale-coldfile-xgcc/cross-gcc-4.7.1/gcc/msep-data/crtend.o
/tmp/freescale-coldfile-xgcc/freescale-coldfire-2011.09/m68k-uclinux/libc/msep-data/usr/lib/crtn.o
/usr/local/gcc-4.7.1/m68k-uclinux/bin/ld.real: final link failed:
Nonrepresentable section on output
collect2: error: ld returned 1 exit status

If I remove the -elf2flt option, the error goes away:

$
COMPILER_PATH=/tmp/freescale-coldfile-xgcc/cross-gcc-4.7.1/gcc/:/usr/local/gcc-4.7.1/m68k-uclinux/bin/:/usr/local/gcc-4.7.1/m68k-uclinux/lib/
\
/tmp/freescale-coldfile-xgcc/cross-gcc-4.7.1/gcc/collect2
--sysroot=/tmp/freescale-coldfile-xgcc/freescale-coldfire-2011.09/m68k-uclinux/libc/msep-data
--eh-frame-hdr -o conftest -t
/tmp/freescale-coldfile-xgcc/freescale-coldfire-2011.09/m68k-uclinux/libc/msep-data/usr/lib/crt1.o
/tmp/freescale-coldfile-xgcc/freescale-coldfire-2011.09/m68k-uclinux/libc/msep-data/usr/lib/crti.o
/tmp/freescale-coldfile-xgcc/cross-gcc-4.7.1/gcc/msep-data/crtbegin.o
-L/tmp/freescale-coldfile-xgcc/cross-gcc-4.7.1/gcc/msep-data
-L/usr/local/gcc-4.7.1/m68k-uclinux/lib/msep-data
-L/tmp/freescale-coldfile-xgcc/cross-gcc-4.7.1/gcc
-L/usr/local/gcc-4.7.1/m68k-uclinux/bin -L/usr/local/gcc-4.7.1/m68k-uclinux/lib
-L/tmp/freescale-coldfile-xgcc/freescale-coldfire-2011.09/m68k-uclinux/libc/msep-data/usr/lib
conftest.o -lgcc -lc -lgcc
/tmp/freescale-coldfile-xgcc/cross-gcc-4.7.1/gcc/msep-data/crtend.o
/tmp/freescale-coldfile-xgcc/freescale-coldfire-2011.09/m68k-uclinux/libc/msep-data/usr/lib/crtn.o
/usr/local/gcc-4.7.1/m68k-uclinux/bin/ld.real: mode m68kelf
/tmp/freescale-coldfile-xgcc/freescale-coldfire-2011.09/m68k-uclinux/libc/msep-data/usr/lib/crt1.o
/tmp/freescale-coldfile-xgcc/freescale-coldfire-2011.09/m68k-uclinux/libc/msep-data/usr/lib/crti.o
/tmp/freescale-coldfile-xgcc/cross-gcc-4.7.1/gcc/msep-data/crtbegin.o
conftest.o
(/tmp/freescale-coldfile-xgcc/freescale-coldfire-2011.09/m68k-uclinux/libc/msep-data/usr/lib/libc.a)__uClibc_main.o
(/tmp/freescale-coldfile-xgcc/freescale-coldfire-2011.09/m68k-uclinux/libc/msep-data/usr/lib/libc.a)strrchr.o
(/tmp/freescale-coldfile-xgcc/freescale-coldfire-2011.09/m68k-uclinux/libc/msep-data/usr/lib/libc.a)exit.o

[Bug c++/54575] [4.8 Regression] ICE with std::vector::insert and -std=c++11

2012-09-17 Thread jason at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=54575

--- Comment #10 from Jason Merrill jason at gcc dot gnu.org 2012-09-18 
03:47:39 UTC ---
Author: jason
Date: Tue Sep 18 03:47:35 2012
New Revision: 191412

URL: http://gcc.gnu.org/viewcvs?root=gccview=revrev=191412
Log:
PR c++/54575
* pt.c (instantiate_alias_template): New.
(tsubst): Use it.
(push_access_scope): Allow TYPE_DECL.

Added:
trunk/gcc/testsuite/g++.dg/cpp0x/alias-decl-21.C
trunk/gcc/testsuite/g++.dg/cpp0x/alias-decl-22.C
Modified:
trunk/gcc/cp/ChangeLog
trunk/gcc/cp/pt.c
trunk/gcc/testsuite/ChangeLog