[Bug c++/53720] 4.2.1 is still the current version of G++

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

Andrew Pinski  changed:

   What|Removed |Added

 Status|UNCONFIRMED |RESOLVED
 Resolution||INVALID

--- Comment #1 from Andrew Pinski  2012-06-19 
04:09:14 UTC ---
Two things:
>./configure
First don't build in the src directory, it is not well supported at all.

Second is /usr/local/bin in your PATH env?


[Bug c++/53721] New: "this" not allowed in trailing return type

2012-06-18 Thread spe56nw9 at vivid dot ocn.ne.jp
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=53721

 Bug #: 53721
   Summary: "this" not allowed in trailing return type
Classification: Unclassified
   Product: gcc
   Version: 4.7.0
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: c++
AssignedTo: unassig...@gcc.gnu.org
ReportedBy: spe56...@vivid.ocn.ne.jp


gcc 4.7.0 outputs following errors when "this" pointer used in trailing return
type:
error: invalid use of incomplete type 'struct A'
error: forward declaration of 'struct A'
error: invalid use of incomplete type 'struct A'
error: forward declaration of 'struct A'

However, according to [expr.prim.general]§5.1.1 clause 3 it should be valid
because it appears after the "cv-qualifier-seq".

Code Example:

struct A
{
void f() {};
auto g() -> decltype(this->f())
{

}

};

Possible duplicate of Bug 52869, however that is about noexcept clauses.


[Bug c++/53720] New: 4.2.1 is still the current version of G++

2012-06-18 Thread americancafe at hotmail dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=53720

 Bug #: 53720
   Summary: 4.2.1 is still the current version of G++
Classification: Unclassified
   Product: gcc
   Version: 4.6.2
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: c++
AssignedTo: unassig...@gcc.gnu.org
ReportedBy: americanc...@hotmail.com


The exact version of GCC: 4.6.2
The system type: Mac OSX 10.6.8   2.0 GHz Intel Core 2 Duo 4GB RAM
The options given when GCC was configured/built: none (default)
The complete command line that triggers the bug:
./configure
 make
 sudo make install
 g++ -v

The compiler output (error messages, warnings, etc.):

Using built-in specs.
Target: i686-apple-darwin10
Configured with: /var/tmp/gcc/gcc-5666.3~6/src/configure --disable-checking
--enable-werror --prefix=/usr --mandir=/share/man
--enable-languages=c,objc,c++,obj-c++
--program-transform-name=/^[cg][^.-]*$/s/$/-4.2/ --with-slibdir=/usr/lib
--build=i686-apple-darwin10 --program-prefix=i686-apple-darwin10-
--host=x86_64-apple-darwin10 --target=i686-apple-darwin10
--with-gxx-include-dir=/include/c++/4.2.1
Thread model: posix
gcc version 4.2.1 (Apple Inc. build 5666) (dot 3)


 After 2 hours of build & install, 4.2.1 is still the current version of G++


[Bug target/48126] arm_output_sync_loop: misplaced memory barrier

2012-06-18 Thread jye2 at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=48126

--- Comment #13 from jye2 at gcc dot gnu.org 2012-06-19 03:01:16 UTC ---
Author: jye2
Date: Tue Jun 19 03:01:10 2012
New Revision: 188766

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=188766
Log:
2012-06-18  Joey Ye  

Backported from mainline
2011-10-14  David Alan Gilbert  

PR target/48126
* config/arm/arm.c (arm_output_sync_loop): Move label before barrier.

Modified:
branches/gcc-4_6-branch/gcc/ChangeLog
branches/gcc-4_6-branch/gcc/config/arm/arm.c


[Bug lto/51205] -flto discards memset/memcpy when only referenced by g++ generated code

2012-06-18 Thread bruck.michael at googlemail dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=51205

Michael Bruck  changed:

   What|Removed |Added

 Status|WAITING |RESOLVED
 Resolution||FIXED

--- Comment #2 from Michael Bruck  
2012-06-19 02:13:02 UTC ---
(In reply to comment #1)
> Can you try if this is fixed with GCC 4.7.x when using binutils 2.22 or newer
> and using the linker plugin?

I tried with arm-eabi-gcc 4.7.1 and binutils 2.22.52 with the same command line
and the bug is fixed in those.

(don't know if it makes a difference that I switched to arm-eabi, but arm-elf
won't build anymore for me)


[Bug target/53712] Does not combine unaligned load with _mm_cmpistri, redundant instruction at -O0

2012-06-18 Thread jbemmel at zonnet dot nl
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=53712

--- Comment #6 from Jeroen van Bemmel  2012-06-19 
00:08:01 UTC ---
There are more SSE4.2 instruction which allow an unaligned memory operand:
* pcmpistri
* pcmpistrm
* pcmpestri
* pcmpestrm
* crc32

(and maybe others?)

Did you catch them all?


[Bug libstdc++/53678] [4.6/4.7/4.8 Regression] namespace pollution on NetBSD

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

Jonathan Wakely  changed:

   What|Removed |Added

  Known to work||4.7.2, 4.8.0
  Known to fail|4.7.0, 4.8.0|4.7.1

--- Comment #4 from Jonathan Wakely  2012-06-19 
00:01:29 UTC ---
fixed for 4.8.0 and 4.7.2 so far


[Bug libstdc++/53678] [4.6/4.7/4.8 Regression] namespace pollution on NetBSD

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

--- Comment #3 from Jonathan Wakely  2012-06-19 
00:00:11 UTC ---
Author: redi
Date: Mon Jun 18 23:59:59 2012
New Revision: 188760

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=188760
Log:
2012-06-19  Jörg Sonnenberger 
Jonathan Wakely  

PR libstdc++/53678
* config/os/bsd/netbsd/ctype_base.h: Check for _CTYPE_U.
* testsuite/22_locale/ctype_base/53678.cc: New.

Added:
   
branches/gcc-4_7-branch/libstdc++-v3/testsuite/22_locale/ctype_base/53678.cc
Modified:
branches/gcc-4_7-branch/libstdc++-v3/ChangeLog
branches/gcc-4_7-branch/libstdc++-v3/config/os/bsd/netbsd/ctype_base.h


[Bug libstdc++/53678] [4.6/4.7/4.8 Regression] namespace pollution on NetBSD

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

--- Comment #2 from Jonathan Wakely  2012-06-18 
21:44:08 UTC ---
Author: redi
Date: Mon Jun 18 21:43:58 2012
New Revision: 188755

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=188755
Log:
2012-06-18  Jörg Sonnenberger 
Jonathan Wakely  

PR libstdc++/53678
* config/os/bsd/netbsd/ctype_base.h: Check for _CTYPE_U.
* testsuite/22_locale/ctype_base/53678.cc: New.

Added:
trunk/libstdc++-v3/testsuite/22_locale/ctype_base/53678.cc
Modified:
trunk/libstdc++-v3/ChangeLog
trunk/libstdc++-v3/config/os/bsd/netbsd/ctype_base.h


[Bug libstdc++/53678] [4.6/4.7/4.8 Regression] namespace pollution on NetBSD

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

Jonathan Wakely  changed:

   What|Removed |Added

  Known to fail||4.8.0

--- Comment #1 from Jonathan Wakely  2012-06-18 
21:11:07 UTC ---
FTR this caused http://llvm.org/bugs/show_bug.cgi?id=12242


[Bug fortran/53718] [4.7/4.8 regression] [OOP] gfortran generates asm label twice in the same output file

2012-06-18 Thread dominiq at lps dot ens.fr
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=53718

--- Comment #5 from Dominique d'Humieres  2012-06-18 
20:45:18 UTC ---
Could it be revision 181505?


[Bug fortran/53718] [4.7/4.8 regression] [OOP] gfortran generates asm label twice in the same output file

2012-06-18 Thread dominiq at lps dot ens.fr
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=53718

--- Comment #4 from Dominique d'Humieres  2012-06-18 
20:35:51 UTC ---
Revision 181425 (2011-11-16) is OK,
revision 181881 (2011-12-01) is not.


[Bug bootstrap/53675] [4.8 Regression] bootstrap fails on non-TLS targets with multiple definitions of libstdc++ symbols

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

Jonathan Wakely  changed:

   What|Removed |Added

 CC||jason at gcc dot gnu.org

--- Comment #3 from Jonathan Wakely  2012-06-18 
20:17:10 UTC ---
git bisect shows it was caused by the patch for PR 53137

f899a730d4f41b6a20b5508059a450f3a9347316 is the first bad commit
commit f899a730d4f41b6a20b5508059a450f3a9347316
Author: jason 
Date:   Fri Jun 1 16:55:17 2012 +

PR c++/53137
* pt.c (instantiate_class_template_1): Set LAMBDA_EXPR_THIS_CAPTURE.
(instantiate_decl): Don't push_to_top_level for local class methods.
(instantiate_class_template_1): Or for local classes.

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


[Bug middle-end/53708] [4.8 Regression] Many failures of the objc tests with -O3 -fnext-runtime and -m32

2012-06-18 Thread iains at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=53708

--- Comment #5 from Iain Sandoe  2012-06-18 20:11:01 
UTC ---
Thanks,
works for me, i686-darwin9 all langs bootstrap & check, fixes the ObjC fails.


[Bug fortran/53718] [4.7/4.8 regression] [OOP] gfortran generates asm label twice in the same output file

2012-06-18 Thread janus at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=53718

--- Comment #3 from janus at gcc dot gnu.org 2012-06-18 20:04:09 UTC ---
(In reply to comment #2)
> just as a side note: most of my bugreports come from compiling babel's
> regression test suite. Babel is a language interoperability tool that (also)
> generates bindings for Fortran 2003. It's free (LGPL) and it might be a very
> good testcase for gfortran in the future.
> 
> https://computation.llnl.gov/casc/components/

Thanks for the pointer. Sounds interesting.


Btw, here is a slightly different (but much simpler) test case, which exhibits
the same problem:


module m
  type t
  end type
end module

subroutine sub1
  use m
  class(t), pointer :: a1
end subroutine

subroutine sub2
  use m
  class(t), pointer :: a2
end subroutine


This structure is rather unusual for F03 object-oriented code, since it
involves 'naked' subroutines (F77 style), which are not part of any MODULE or
PROGRAM. Putting both routines into a module or program makes the error go
away.


[Bug debug/53719] can't display x87 stack information

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

--- Comment #1 from Andrew Pinski  2012-06-18 
19:56:13 UTC ---
I think you might need a newer version of gdb to work correctly with GCC 4.5.


[Bug middle-end/8743] receiving result from __builtin_return_address() beyond stack top causes segfault

2012-06-18 Thread gcc at kalvdans dot no-ip.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=8743

Christian Häggström  changed:

   What|Removed |Added

 CC||gcc at kalvdans dot
   ||no-ip.org

--- Comment #10 from Christian Häggström  
2012-06-18 19:34:23 UTC ---
I guess this bug can be closed now, my gcc 4.7 documentation states:

 -- Built-in Function: void * __builtin_return_address (unsigned int LEVEL)
[...]
 On some machines it may be impossible to determine the return
 address of any function other than the current one; in such cases,
 or when the top of the stack has been reached, this function will
 return `0' or a random value.
[...]
 This function should only be used with a nonzero argument for
 debugging purposes.


[Bug debug/53719] New: can't display x87 stack information

2012-06-18 Thread tango127 at epix dot net
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=53719

 Bug #: 53719
   Summary: can't display x87 stack information
Classification: Unclassified
   Product: gcc
   Version: unknown
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: debug
AssignedTo: unassig...@gcc.gnu.org
ReportedBy: tango...@epix.net


Xcode, using gcc 4.5, use to display 80-bit x87 stack values correctly.  Now
all I see is the following (notice no values shown for stack values), although
generated answers are produced correctly and returned to memory variables.  Did
something go "bump" in the night with this newer release?

Floating Point Registers
fctrlunsigned short0x037f
fstatunsigned short0x3800
ftagunsigned char0x80
fopunsigned short0x076d
fioffunsigned int0x0da8
fisegunsigned short0x002b
fooffunsigned int0x5fbff848
fosegunsigned short0x0023
mxcsrunsigned int0x1f80
mxcsrmaskunsigned int0x
stmm0unsigned char  __attribute__((ext_vector_type(10)))
stmm1unsigned char  __attribute__((ext_vector_type(10)))
stmm2unsigned char  __attribute__((ext_vector_type(10)))
stmm3unsigned char  __attribute__((ext_vector_type(10)))
stmm4unsigned char  __attribute__((ext_vector_type(10)))
stmm5unsigned char  __attribute__((ext_vector_type(10)))
stmm6unsigned char  __attribute__((ext_vector_type(10)))
stmm7unsigned char  __attribute__((ext_vector_type(10)))
xmm0unsigned char  __attribute__((ext_vector_type(16)))
xmm1unsigned char  __attribute__((ext_vector_type(16)))
xmm2unsigned char  __attribute__((ext_vector_type(16)))
xmm3unsigned char  __attribute__((ext_vector_type(16)))
xmm4unsigned char  __attribute__((ext_vector_type(16)))
xmm5unsigned char  __attribute__((ext_vector_type(16)))
xmm6unsigned char  __attribute__((ext_vector_type(16)))
xmm7unsigned char  __attribute__((ext_vector_type(16)))
xmm8unsigned char  __attribute__((ext_vector_type(16)))
xmm9unsigned char  __attribute__((ext_vector_type(16)))
xmm10unsigned char  __attribute__((ext_vector_type(16)))
xmm11unsigned char  __attribute__((ext_vector_type(16)))
xmm12unsigned char  __attribute__((ext_vector_type(16)))
xmm13unsigned char  __attribute__((ext_vector_type(16)))
xmm14unsigned char  __attribute__((ext_vector_type(16)))
xmm15unsigned char  __attribute__((ext_vector_type(16)))


[Bug fortran/53718] [4.7/4.8 regression] [OOP] gfortran generates asm label twice in the same output file

2012-06-18 Thread adrian at llnl dot gov
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=53718

--- Comment #2 from Adrian Prantl  2012-06-18 18:55:11 
UTC ---
just as a side note: most of my bugreports come from compiling babel's
regression test suite. Babel is a language interoperability tool that (also)
generates bindings for Fortran 2003. It's free (LGPL) and it might be a very
good testcase for gfortran in the future.

https://computation.llnl.gov/casc/components/


[Bug fortran/53718] [4.7/4.8 regression] [OOP] gfortran generates asm label twice in the same output file

2012-06-18 Thread janus at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=53718

janus at gcc dot gnu.org changed:

   What|Removed |Added

 Status|UNCONFIRMED |NEW
   Last reconfirmed||2012-06-18
Summary|[OOP] gfortran generates|[4.7/4.8 regression] [OOP]
   |asm label twice in the same |gfortran generates asm
   |output file |label twice in the same
   ||output file
 Ever Confirmed|0   |1

--- Comment #1 from janus at gcc dot gnu.org 2012-06-18 18:46:10 UTC ---
Confirmed with 4.7 and trunk. This is actually a regression, since it works
with 4.6.3.


[Bug target/53712] Does not combine unaligned load with _mm_cmpistri, redundant instruction at -O0

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

--- Comment #5 from uros at gcc dot gnu.org 2012-06-18 18:41:31 UTC ---
Author: uros
Date: Mon Jun 18 18:41:25 2012
New Revision: 188753

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=188753
Log:
PR target/53712
* config/i386/sse.md (*sse4_2_pcmpestr_unaligned): New.
(*sse4_2_pcmpistr_unaligned): New.

testsuite/ChangeLog:

PR target/53712
* gcc.target/i386/pr53712.c: New test.


Added:
trunk/gcc/testsuite/gcc.target/i386/pr53712.c
Modified:
trunk/gcc/ChangeLog
trunk/gcc/config/i386/sse.md
trunk/gcc/testsuite/ChangeLog


[Bug fortran/53692] OPTIONAL: Scalarizing over the wrong array

2012-06-18 Thread burnus at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=53692

Tobias Burnus  changed:

   What|Removed |Added

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

--- Comment #2 from Tobias Burnus  2012-06-18 
18:37:53 UTC ---
FIXED on the trunk (4.8).


[Bug rtl-optimization/53700] [4.7 regression] ICE in reload_cse_simplify_operands, at postreload.c:403

2012-06-18 Thread vmakarov at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=53700

--- Comment #6 from Vladimir Makarov  2012-06-18 
18:34:12 UTC ---
Author: vmakarov
Date: Mon Jun 18 18:34:01 2012
New Revision: 188750

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=188750
Log:
2012-06-18  Vladimir Makarov  

PR rtl-optimization/53700

Backport from mainline
2012-03-29  Vladimir Makarov  

* ira-color.c (setup_left_conflict_sizes_p): Process all
conflicting objects.


Modified:
branches/gcc-4_7-branch/gcc/ChangeLog
branches/gcc-4_7-branch/gcc/ira-color.c


[Bug fortran/53692] OPTIONAL: Scalarizing over the wrong array

2012-06-18 Thread burnus at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=53692

--- Comment #1 from Tobias Burnus  2012-06-18 
18:32:05 UTC ---
Author: burnus
Date: Mon Jun 18 18:31:54 2012
New Revision: 188749

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=188749
Log:
2012-06-18  Tobias Burnus  

PR fortran/53692
* trans-array.c (set_loop_bounds): Don't scalarize via absent
optional arrays.
* resolve.c (resolve_elemental_actual): Don't stop resolving
after printing a warning.

2012-06-18  Tobias Burnus  

PR fortran/53692
* gfortran.dg/elemental_optional_args_6.f90: New.


Added:
trunk/gcc/testsuite/gfortran.dg/elemental_optional_args_6.f90
Modified:
trunk/gcc/fortran/ChangeLog
trunk/gcc/fortran/resolve.c
trunk/gcc/fortran/trans-array.c
trunk/gcc/testsuite/ChangeLog


[Bug fortran/53526] [Coarray] (lib) Properly handle MOVE_ALLOC for coarrays

2012-06-18 Thread burnus at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=53526

Tobias Burnus  changed:

   What|Removed |Added

 Status|UNCONFIRMED |RESOLVED
 Resolution||FIXED

--- Comment #6 from Tobias Burnus  2012-06-18 
18:31:21 UTC ---
Seemingly, I was wrongly claiming that J3 passed the current text: It passed a
J3 meeting but not the email ballot. The latter is currently underway and two
of the votes were "N" with the comment that MOVE_ALLOC should act similar to
ALLOCATE by creating a global barrier. Namely:
http://j3-fortran.org/pipermail/j3/2012-June/005317.html
http://j3-fortran.org/pipermail/j3/2012-June/005318.html

As that's what is implemented in gfortran and as it makes sense, I close this
PR as FIXED.


[Bug fortran/53526] [Coarray] (lib) Properly handle MOVE_ALLOC for coarrays

2012-06-18 Thread burnus at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=53526

--- Comment #5 from Tobias Burnus  2012-06-18 
18:15:56 UTC ---
Author: burnus
Date: Mon Jun 18 18:15:51 2012
New Revision: 188748

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=188748
Log:
2012-06-18  Tobias Burnus  

PR fortran/53526
* trans-intrinsic.c (conv_intrinsic_move_alloc): Handle
* coarrays.

2012-06-18  Tobias Burnus  

PR fortran/53526
* gfortran.dg/coarray_lib_move_alloc_1.f90: New.


Added:
trunk/gcc/testsuite/gfortran.dg/coarray/move_alloc_1.f90
trunk/gcc/testsuite/gfortran.dg/coarray_lib_move_alloc_1.f90
Modified:
trunk/gcc/fortran/ChangeLog
trunk/gcc/fortran/trans-intrinsic.c
trunk/gcc/testsuite/ChangeLog


[Bug fortran/53526] [Coarray] (lib) Properly handle MOVE_ALLOC for coarrays

2012-06-18 Thread burnus at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=53526

--- Comment #4 from Tobias Burnus  2012-06-18 
18:14:11 UTC ---
Author: burnus
Date: Mon Jun 18 18:14:06 2012
New Revision: 188747

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=188747
Log:
2012-06-18  Tobias Burnus  

PR fortran/53526
* check.c (gfc_check_move_alloc): Reject coindexed actual
* arguments
and those with different corank.

2012-06-18  Tobias Burnus  

PR fortran/53526
* gfortran.dg/coarray_27.f90: New.


Added:
trunk/gcc/testsuite/gfortran.dg/coarray_27.f90
Modified:
trunk/gcc/fortran/ChangeLog
trunk/gcc/fortran/check.c
trunk/gcc/testsuite/ChangeLog


[Bug fortran/53718] New: gfortran generates asm label twice in the same output file

2012-06-18 Thread adrian at llnl dot gov
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=53718

 Bug #: 53718
   Summary: gfortran generates asm label twice in the same output
file
Classification: Unclassified
   Product: gcc
   Version: 4.7.1
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: fortran
AssignedTo: unassig...@gcc.gnu.org
ReportedBy: adr...@llnl.gov


Created attachment 27653
  --> http://gcc.gnu.org/bugzilla/attachment.cgi?id=27653
Delta-reduced input code

gfortran --version
GNU Fortran (GCC) 4.7.1
Copyright (C) 2012 Free Software Foundation, Inc.

uname -a
Linux [...] 2.6.32-41-generic #89-Ubuntu SMP Fri Apr 27 22:18:56 UTC 2012
x86_64 GNU/Linux

gfortran  -c exceptionstest.f03
/tmp/cc95FYwH.s: Assembler messages:
/tmp/cc95FYwH.s:148: Error: symbol `__copy_idl_int_array_f03_Idl_int_2d' is
already defined
/tmp/cc95FYwH.s:199: Error: symbol `__def_init_idl_int_array_f03_Idl_int_2d' is
already defined
/tmp/cc95FYwH.s:203: Error: symbol `__vtab_idl_int_array_f03_Idl_int_2d' is
already defined

Delta-reduced input code is attached.


[Bug target/53712] Does not combine unaligned load with _mm_cmpistri, redundant instruction at -O0

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

--- Comment #4 from Uros Bizjak  2012-06-18 17:42:36 
UTC ---
BTW: I am testing attached patch with following lex.c patch:

--cut here--
Index: libcpp/lex.c
===
--- libcpp/lex.c(revision 188736)
+++ libcpp/lex.c(working copy)
@@ -420,6 +420,7 @@
 {
   typedef char v16qi __attribute__ ((__vector_size__ (16)));
   static const v16qi search = { '\n', '\r', '?', '\\' };
+  v16qi sv;

   uintptr_t si = (uintptr_t)s;
   uintptr_t index;
@@ -439,8 +440,9 @@

   /* ??? The builtin doesn't understand that the PCMPESTRI read from
 memory need not be aligned.  */
-  __asm ("%vpcmpestri $0, (%1), %2"
-: "=c"(index) : "r"(s), "x"(search), "a"(4), "d"(16));
+  sv = __builtin_ia32_loaddqu ((const char *) s);
+  index = __builtin_ia32_pcmpestri128 (search, 4, sv, 16, 0);
+
   if (__builtin_expect (index < 16, 0))
goto found;

--cut here--


[Bug target/53712] Does not combine unaligned load with _mm_cmpistri, redundant instruction at -O0

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

Uros Bizjak  changed:

   What|Removed |Added

 Status|NEW |ASSIGNED
 AssignedTo|unassigned at gcc dot   |ubizjak at gmail dot com
   |gnu.org |

--- Comment #3 from Uros Bizjak  2012-06-18 17:40:15 
UTC ---
Created attachment 27652
  --> http://gcc.gnu.org/bugzilla/attachment.cgi?id=27652
Proposed patch

Patch that teaches gcc how to merge pcmpestr/pcmpistr with unaligned load.


[Bug bootstrap/53675] [4.8 Regression] bootstrap fails on non-TLS targets with multiple definitions of libstdc++ symbols

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

Jonathan Wakely  changed:

   What|Removed |Added

 Target|x86_64-unknown-netbsd5.1|
   Host|x86_64-unknown-netbsd5.1|
Summary|[4.8 Regression] bootstrap  |[4.8 Regression] bootstrap
   |fails on netbsd5.1 with |fails on non-TLS targets
   |multiple definitions of |with multiple definitions
   |libstdc++ symbols   |of libstdc++ symbols
  Build|x86_64-unknown-netbsd5.1|

--- Comment #2 from Jonathan Wakely  2012-06-18 
17:36:41 UTC ---
Reproduced on x86_64-unknown-linux-gnu (using gcc20 in the compile farm)
configured with --disable-tls, with binutils version:
GNU ld (GNU Binutils for Debian) 2.20.1-system.20100303


/usr/bin/ld: Dwarf Error: found dwarf version '49668', this reader only handles
version 2 and 3 information.
../../src/debug/c++11/.libs/libc++11convenience.a(future.o): In function
`_ZZSt9call_onceIMSt6threadFvvEJSt17reference_wrapperIS0_EEEvRSt9once_flagOT_DpOT0_ENKUlvE_cvPFvvEEv':
future.cc:(.text._ZZSt9call_onceIMSt6threadFvvEISt17reference_wrapperIS0_EEEvRSt9once_flagOT_DpOT0_ENKUlvE_cvPFvvEEv+0x0):
multiple definition of
`_ZZSt9call_onceIMSt6threadFvvEISt17reference_wrapperIS0_EEEvRSt9once_flagOT_DpOT0_ENKUlvE_cvPFvvEEv'
/usr/bin/ld: Dwarf Error: found dwarf version '17193', this reader only handles
version 2 and 3 information.
.libs/compatibility-thread-c++0x.o:compatibility-thread-c++0x.cc:(.text._ZZSt9call_onceIMSt6threadFvvEISt17reference_wrapperIS0_EEEvRSt9once_flagOT_DpOT0_ENKUlvE_cvPFvvEEv+0x0):
first defined here

Full configure command:

/home/jwakely/src/gcc/configure --prefix=/home/jwakely/gcc/4.x
--with-system-zlib --with-gnu-ld --with-gnu-as --disable-libitm
--disable-libquadmath --disable-libmudflap --enable-libstdcxx-debug
--enable-languages=c,c++ --disable-bootstrap --disable-tls


[Bug bootstrap/52887] Bootstrap on AIX failure: Undefined symbol: .std::function::function(std::function

2012-06-18 Thread skunk at iskunk dot org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=52887

--- Comment #12 from Daniel Richard G.  2012-06-18 
16:56:42 UTC ---
(In reply to comment #11)
> We know the instantiations that are needed, but I don't want to define them 
> for
> all platforms if they're not needed elsewhere. I also have no way of testing 
> on
> AIX, so someone needs to run the teststuite with the changes.

I can do the testing, but is this really the solution? Why would AIX (and not
even all versions of AIX) need these instantiations, how is it doing things
differently from other systems?

This is fine as a workaround, but I'm presuming the real fix is to get GCC on
AIX working again the same way as it does elsewhere.


[Bug middle-end/53303] Reload/RA issue on word paradoxical subregs

2012-06-18 Thread aurelien.buhrig.gcc at gmail dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=53303

Aurelien Buhrig  changed:

   What|Removed |Added

Summary|Reload/RA issue on  |Reload/RA issue on word
   |word-sized paradoxical  |paradoxical subregs
   |subregs for big-endian  |
   |targets |

--- Comment #3 from Aurelien Buhrig  
2012-06-18 16:14:17 UTC ---
This bug does not depends on endianess.
It also occurs on little endian target, when RA allocates such a paradoxical
register with the last hardware register which is smaller than a word (in
comparison with the first register for big-endian targets).


[Bug target/52989] Installation error on OS X (arm-eabi) cross-compiler

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

--- Comment #4 from Andrew Pinski  2012-06-18 
15:47:16 UTC ---
(In reply to comment #3)
> (In reply to comment #2)
> > (In reply to comment #1)
> > I don't think we support --with-multilib-list yet for arm - 
> If not, what is the proper way to specify the libraries to build for ARM
> (regular ARM ISA and Thumb-1 ISA)?

You have to edit the t-arm-elf but the default is to enable arm and thumb
multilibs.


[Bug bootstrap/52887] Bootstrap on AIX failure: Undefined symbol: .std::function::function(std::function

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

--- Comment #11 from Jonathan Wakely  2012-06-18 
15:26:03 UTC ---
We know the instantiations that are needed, but I don't want to define them for
all platforms if they're not needed elsewhere. I also have no way of testing on
AIX, so someone needs to run the teststuite with the changes.


[Bug c/53716] New: Intentional or bug? Inconsistencies in error diagnostics in function redeclaration involving stdcall attribute

2012-06-18 Thread mib.bugzilla at gmail dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=53716

 Bug #: 53716
   Summary: Intentional or bug? Inconsistencies in error
diagnostics in function redeclaration involving
stdcall attribute
Classification: Unclassified
   Product: gcc
   Version: 4.6.2
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: c
AssignedTo: unassig...@gcc.gnu.org
ReportedBy: mib.bugzi...@gmail.com


Two questions about diagnostics on templated/non-templated function
redeclarations and the presence of attribute stdcall

Question 1:

// no error for non template function redeclaration, i.e.:
void __attribute((stdcall)) f(int);
void f(int) {;} // compiles fine

// but on x86, g++ 4.6 and later give an error if function is a template --
Why?
template  void __attribute__((stdcall)) f2(int);
template  void f2(int) {;} // error here?

test3.c:2:31: error: new declaration âtemplate void f2(int)â
test3.c:1:50: error: ambiguates old declaration âtemplate void
f2(int)â

Question 2:
On x86 (not x64) this test case gets an error when compiled with gcc 4.6.2, but
there is no error when compiled with g++. Is this intentional or should an
error be produced in g++ as well?

% cat test2.c
// no error for non template function redeclaration, i.e.:
 void __attribute((stdcall)) f(int);
 void f(int a) {;} // compiles fine

gcc -c test2.c
test2.c:3:7: error: conflicting types for âfâ
test2.c:2:30: note: previous declaration of âfâ was here

% g++ -c test2.c
// no error


[Bug target/52908] xop-mul-1:f9 miscompiled on bulldozer (-mxop)

2012-06-18 Thread vekumar at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=52908

--- Comment #9 from vekumar at gcc dot gnu.org 2012-06-18 15:10:51 UTC ---
Author: vekumar
Date: Mon Jun 18 15:10:45 2012
New Revision: 188736

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=188736
Log:
Back port Fix PR 52908 - xop-mul-1:f9 miscompiled on bulldozer (-mxop) to 4.7
branch

Modified:
branches/gcc-4_7-branch/gcc/ChangeLog
branches/gcc-4_7-branch/gcc/config/i386/sse.md
branches/gcc-4_7-branch/gcc/testsuite/ChangeLog
   
branches/gcc-4_7-branch/gcc/testsuite/gcc.target/i386/xop-imul32widen-vector.c


[Bug tree-optimization/53703] [4.8 Regression] verify_ssa: definition in block 105 does not dominate use in block 103

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

H.J. Lu  changed:

   What|Removed |Added

 CC||mario-baumann at web dot de

--- Comment #5 from H.J. Lu  2012-06-18 14:33:05 
UTC ---
*** Bug 53715 has been marked as a duplicate of this bug. ***


[Bug c++/53715] internal compiler error: verify_ssa failed

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

H.J. Lu  changed:

   What|Removed |Added

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

--- Comment #1 from H.J. Lu  2012-06-18 14:33:05 
UTC ---
Dup.

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


[Bug libstdc++/53673] Add magic weak symbol to indicate C++ standard setting (C++03, C++11 etc) to help debug ABI problems

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

--- Comment #11 from Jonathan Wakely  2012-06-18 
14:22:05 UTC ---
Please don't just use this PR for "me too" comments about interoperability


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

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

Richard Guenther  changed:

   What|Removed |Added

  Known to work||4.8.0
   Target Milestone|4.7.3   |4.7.2
Summary|[4.7/4.8 regression] ICE in |[4.7 regression] ICE in
   |vect_get_vec_def_for_stmt_c |vect_get_vec_def_for_stmt_c
   |opy, at |opy, at
   |tree-vect-stmts.c:1438  |tree-vect-stmts.c:1438
  Known to fail||4.7.1

--- Comment #6 from Richard Guenther  2012-06-18 
14:10:57 UTC ---
Fixed on trunk sofar.


[Bug target/52989] Installation error on OS X (arm-eabi) cross-compiler

2012-06-18 Thread eblot.ml at gmail dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=52989

--- Comment #3 from Emmanuel Blot  2012-06-18 
14:06:43 UTC ---
(In reply to comment #2)
> (In reply to comment #1)
> I don't think we support --with-multilib-list yet for arm - 
If not, what is the proper way to specify the libraries to build for ARM
(regular ARM ISA and Thumb-1 ISA)?


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

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

--- Comment #5 from Richard Guenther  2012-06-18 
14:05:33 UTC ---
Author: rguenth
Date: Mon Jun 18 14:05:27 2012
New Revision: 188733

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=188733
Log:
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:
trunk/gcc/testsuite/g++.dg/torture/pr53693.C
Modified:
trunk/gcc/ChangeLog
trunk/gcc/testsuite/ChangeLog
trunk/gcc/tree-vect-patterns.c


[Bug middle-end/53688] [4.8 Regression] 191.fma3d in SPEC CPU 2000 miscompiled

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

--- Comment #2 from Richard Guenther  2012-06-18 
13:50:28 UTC ---
NEW_PAGE seems to be miscompiled - we fail to output JOB_ID_RECORD%VERSION
('SPEC CPU'), the comparison difference is lots of

@@ -146,7 +146,7 @@
   43255/31.1579E+03   -8.1233E+020.E+002.5290E+02   
0.E+000.E+00 1   41   1.42E+02 43255
   43255/4   -3.5068E+03   -4.3304E+030.E+002.0702E+04   
0.E+000.E+00 1   41   1.42E+02 43255
   43255/5   -3.5204E+03   -3.2181E+030.E+002.4813E+04   
0.E+000.E+00 1   41   1.42E+02 43255
-1 FMA-3D  SPEC CPU   Impulse Loaded Cylindrical Panel (w/ Subcycling) -
100MB Data Set  Page No:  10
+1 FMA-3D Impulse Loaded Cylindrical Panel (w/ Subcycling) -
100MB Data Set  Page No:  10

 Time T = 4.57200E-07   Time Step = 360
 0   NPX-DISPLACE   Y-DISPLACE   Z-DISPLACE   X-VELOCITY   Y-VELOCITY  
Z-VELOCITY  X-ACCELERATE Y-ACCELERATE Z-ACCELERATE NP

by inspecting with gdb you can see that JOB_ID_RECORD%VERSION is properly
populated but HEADLINE is not properly built.

It is sched2 who re-orders

(insn:TI 102 100 250 8 (parallel [
(set (reg:DI 2 cx [143])
(const_int 0 [0]))
(set (reg/f:DI 5 di [141])
(plus:DI (reg/f:DI 5 di [141])
(reg:DI 2 cx [143])))
(set (mem/c:BLK (reg/f:DI 5 di [141]) [0 MEM[(void *)&headline +
9B]+0 A8])
(const_int 0 [0]))
(use (reg:QI 0 ax [142]))
(use (reg:DI 2 cx [143]))
]) t.f90:43848 896 {*rep_stosqi}
 (expr_list:REG_UNUSED (reg/f:DI 5 di [141])
(nil)))

and

(insn:TI 106 96 107 8 (set (mem/c:DI (const:DI (plus:DI (symbol_ref:DI
("headline.65670") [flags 0x2]  )
(const_int 10 [0xa]))) [0 MEM[(c_char * {ref-all})&headline
+ 10B]+0 S8 A16])
(reg:DI 1 dx [orig:146 MEM[(c_char * {ref-all})&job_id_record + 12B] ]
[146])) t.f90:43850 62 {*movdi_internal_rex64}
 (expr_list:REG_DEAD (reg:DI 1 dx [orig:146 MEM[(c_char *
{ref-all})&job_id_record + 12B] ] [146])
(nil)))

quite possibly because the MEM_ATTRs in the setmem pattern do not have
a MEM_EXPR that has a suitable size.

Testcase:

char headline[256];
struct hdr {
  char part1[9];
  char part2[8];
} p;

void __attribute__((noinline,noclone))
init()
{
  __builtin_memcpy (p.part1, "FOOBARFOO", sizeof (p.part1));
  __builtin_memcpy (p.part2, "SPEC CPU", sizeof (p.part2));
}

int main()
{
  char *x;
  int c;
  init();
  __builtin_memcpy (&headline[0], p.part1, 9);
  c = 9;
  x = &headline[0];
  x = x + c;
  __builtin_memset (x, ' ', 245);
  __builtin_memcpy (&headline[10], p.part2, 8);
  c = 18;
  x = &headline[0];
  x = x + c;
  __builtin_memset (x, ' ', 238);
  if (headline[10] != 'S')
__builtin_abort ();
  return 0;
}


[Bug c++/53715] New: internal compiler error: verify_ssa failed

2012-06-18 Thread mario-baumann at web dot de
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=53715

 Bug #: 53715
   Summary: internal compiler error: verify_ssa failed
Classification: Unclassified
   Product: gcc
   Version: 4.8.0
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: c++
AssignedTo: unassig...@gcc.gnu.org
ReportedBy: mario-baum...@web.de


Created attachment 27650
  --> http://gcc.gnu.org/bugzilla/attachment.cgi?id=27650
bzip2 compressed preprocessed c++ source file

Hi,

compilation of attached (preprocessed c++ source (already delta reduced))
failed with -O2 but works fine with -01 optimisation.

> g++ -m32 -O2 -c goo.ii
...
for SSA_NAME: .MEM_44 in statement:
# .MEM_135 = VDEF <.MEM_44>
D.6496.last_group = MEM[(const struct named_slot_map_iterator &)&D.5756 +
16].last_group;
goo.ii:20:9334: internal compiler error: verify_ssa failed
Please submit a full bug report,
with preprocessed source if appropriate.
See <http://gcc.gnu.org/bugs.html> for instructions.

PS. Last working svn revision for attached file was 188424. First svn revision
which fails was 188496.

---
> uname -a
Linux ahsoka.intec.dom 2.6.32-220.17.1.el6.x86_64 #1 SMP Thu Apr 26 13:37:13
EDT 2012 x86_64 x86_64 x86_64 GNU/Linux

> rpm -qa "glibc*" | grep -e 'glibc-[0-9]' | sort -u
glibc-2.12-1.47.el6_2.12.i686
glibc-2.12-1.47.el6_2.12.x86_64

> g++ -v
Using built-in specs.
COLLECT_GCC=g++
COLLECT_LTO_WRAPPER=/app2/gcc/4.8.0-20120618-svn188723/i686/libexec/gcc/i686-unknown-linux-gnu/4.8.0/lto-wrapper
Target: i686-unknown-linux-gnu
Configured with: ./configure --prefix=/app2/gcc/4.8.0-20120618-svn188723/i686
--enable-languages=c,c++,fortran --disable-nls
--with-gmp=/app2/gcc/4.8.0-20120618-svn188723/i686/aux
--with-mpfr=/app2/gcc/4.8.0-20120618-svn188723/i686/aux
--with-mpc=/app2/gcc/4.8.0-20120618-svn188723/i686/aux
--with-ppl=/app2/gcc/4.8.0-20120618-svn188723/i686/aux
--with-cloog=/app2/gcc/4.8.0-20120618-svn188723/i686/aux --disable-multilib
--build=i686-unknown-linux-gnu
Thread model: posix
gcc version 4.8.0 20120618 (experimental) (GCC) 

> ld -v
GNU ld (GNU Binutils) 2.22.52.20120618


[Bug middle-end/53698] [4.8 Regression] ICE: in plus_constant, at explow.c:88 with -O -mx32 -maddress-mode=long -fno-tree-dominator-opts

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

H.J. Lu  changed:

   What|Removed |Added

 Status|NEW |RESOLVED
  Component|target  |middle-end
 Resolution||FIXED

--- Comment #5 from H.J. Lu  2012-06-18 13:02:00 
UTC ---
Fixed.


[Bug middle-end/53708] [4.8 Regression] Many failures of the objc tests with -O3 -fnext-runtime and -m32

2012-06-18 Thread dominiq at lps dot ens.fr
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=53708

--- Comment #4 from Dominique d'Humieres  2012-06-18 
12:42:12 UTC ---
A clean bootstrap of revision 188725 with the patch in comment #2 just finished
without any problem. In addition the patch fixed the following failures in the
tests of obj-c++

Running target unix/-m32
...
FAIL: obj-c++.dg/torture/trivial.mm  -O3 -fomit-frame-pointer  -fnext-runtime
(test for excess errors)
WARNING: obj-c++.dg/torture/trivial.mm  -O3 -fomit-frame-pointer 
-fnext-runtime compilation failed to produce executable
FAIL: obj-c++.dg/torture/trivial.mm  -O3 -g  -fnext-runtime (test for excess
errors)
WARNING: obj-c++.dg/torture/trivial.mm  -O3 -g  -fnext-runtime compilation
failed to produce executable
FAIL: obj-c++.dg/torture/strings/const-str-7.mm  -O3 -fomit-frame-pointer 
-fnext-runtime (test for excess errors)
WARNING: obj-c++.dg/torture/strings/const-str-7.mm  -O3 -fomit-frame-pointer 
-fnext-runtime compilation failed to produce executable
FAIL: obj-c++.dg/torture/strings/const-str-7.mm  -O3 -g  -fnext-runtime (test
for excess errors)
WARNING: obj-c++.dg/torture/strings/const-str-7.mm  -O3 -g  -fnext-runtime
compilation failed to produce executable
FAIL: obj-c++.dg/torture/strings/const-str-8.mm  -O3 -fomit-frame-pointer 
-fnext-runtime (test for excess errors)
WARNING: obj-c++.dg/torture/strings/const-str-8.mm  -O3 -fomit-frame-pointer 
-fnext-runtime compilation failed to produce executable
FAIL: obj-c++.dg/torture/strings/const-str-8.mm  -O3 -g  -fnext-runtime (test
for excess errors)
WARNING: obj-c++.dg/torture/strings/const-str-8.mm  -O3 -g  -fnext-runtime
compilation failed to produce executable
FAIL: obj-c++.dg/torture/tls/thr-init-3.mm  -O3 -fomit-frame-pointer 
-fnext-runtime (test for excess errors)
WARNING: obj-c++.dg/torture/tls/thr-init-3.mm  -O3 -fomit-frame-pointer 
-fnext-runtime compilation failed to produce executable
FAIL: obj-c++.dg/torture/tls/thr-init-3.mm  -O3 -g  -fnext-runtime (test for
excess errors)
WARNING: obj-c++.dg/torture/tls/thr-init-3.mm  -O3 -g  -fnext-runtime
compilation failed to produce executable


[Bug lto/43581] exception handling broken across shared libraries with -fuse-linker-plugin

2012-06-18 Thread vincenzo.innocente at cern dot ch
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=43581

--- Comment #8 from vincenzo Innocente  
2012-06-18 12:29:44 UTC ---
I get a segfault if I add -Wl,--icf=all (for gold)

c++ -Wl,-v -g -fno-omit-frame-pointer -pthread -O2 lib.cpp -flto
-ffunction-sections -fPIC -fvisibility-inlines-hidden -shared -Wl,-rpath ./ -o
liblib.so -Wl,-E -Wl,--icf=all
c++ -g -fno-omit-frame-pointer -pthread -O2 main.cpp  -flto -ffunction-sections
-fPIC -fvisibility-inlines-hidden  -Wl,-rpath ./ -Wl,-E  -L ./ -llib
-Wl,--icf=all

Program received signal SIGABRT, Aborted.
0x003a4f630285 in raise () from /lib64/libc.so.6
(gdb) where
#0  0x003a4f630285 in raise () from /lib64/libc.so.6
#1  0x003a4f631d30 in abort () from /lib64/libc.so.6
#2  0x2abcd0f0 in read_encoded_value_with_base (encoding=15 '\017',
base=, p=, val=0x7fff99b8)
at ../../../gcc-4.7/libgcc/unwind-pe.h:257
#3  0x2abce4c1 in _Unwind_IteratePhdrCallback (info=,
size=, ptr=0x7fff9ae0) at
../../../gcc-4.7/libgcc/unwind-dw2-fde-dip.c:402
#4  0x003a4f707c77 in dl_iterate_phdr () from /lib64/libc.so.6
#5  0x2abce9d2 in _Unwind_Find_FDE (pc=0x2aab1209,
bases=0x7fff9d38) at ../../../gcc-4.7/libgcc/unwind-dw2-fde-dip.c:451
#6  0x2abcbeeb in uw_frame_state_for (context=0x7fff9c90,
fs=0x7fff9d80) at ../../../gcc-4.7/libgcc/unwind-dw2.c:1179
#7  0x2abcc9fb in _Unwind_RaiseException (exc=0x403070) at
../../../gcc-4.7/libgcc/unwind.inc:99
#8  0x2ab17961 in __cxxabiv1::__cxa_throw (obj=0x403090,
tinfo=, dest=) at
../../../../gcc-4.7/libstdc++-v3/libsupc++/eh_throw.cc:78
#9  0x2aab120a in libbar () at lib.cpp:6
#10 0x7fffa108 in ?? ()
#11 0x004030c8 in ?? ()
#12 0x003a4f952350 in initial () from /lib64/libc.so.6
#13 0x003a4f41cbc0 in ?? () from /lib64/ld-linux-x86-64.so.2
#14 0x in ?? ()

with

c++ -v
Using built-in specs.
COLLECT_GCC=c++
COLLECT_LTO_WRAPPER=/afs/cern.ch/user/i/innocent/w3/gcc47slc5/libexec/gcc/x86_64-unknown-linux-gnu/4.7.2/lto-wrapper
Target: x86_64-unknown-linux-gnu
Configured with: ../gcc-4.7/configure --enable-languages=c,c++,lto
--disable-multilib --enable-gold=yes --disable-nls --enable-lto
--with-mpc=/afs/cern.ch/cms/slc5_amd64_gcc470/external/gcc/4.7.0
--with-gmp=/afs/cern.ch/cms/slc5_amd64_gcc470/external/gcc/4.7.0
--with-mpfr=/afs/cern.ch/cms/slc5_amd64_gcc470/external/gcc/4.7.0
--prefix=/afs/cern.ch/user/i/innocent/w3/gcc47slc5
--with-build-time-tools=/build/ge/new-binutils/a/slc5_amd64_gcc470/external/gcc/4.7.0-cms/bin
--with-build-config=bootstrap-lto
Thread model: posix
gcc version 4.7.2 20120615 (prerelease) [gcc-4_7-branch revision 188650] (GCC) 
[vocms123] ~/public/ctest/bugs48/ex43581 $ ld -v
GNU gold (GNU Binutils 2.22.52.20120515) 1.11

same of "vanilla" fedora17
(gdb) run
Starting program: /home/innocent/ctest/bugs48/ex43581/a.out 
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib64/libthread_db.so.1".

Program received signal SIGABRT, Aborted.
0x003a45635965 in raise () from /lib64/libc.so.6
Missing separate debuginfos, use: debuginfo-install glibc-2.15-37.fc17.x86_64
libgcc-4.7.0-5.fc17.x86_64 libstdc++-4.7.0-5.fc17.x86_64
(gdb) where
#0  0x003a45635965 in raise () from /lib64/libc.so.6
#1  0x003a45637118 in abort () from /lib64/libc.so.6
#2  0x003a49a101f0 in ?? () from /lib64/libgcc_s.so.1
#3  0x003a49a115c1 in ?? () from /lib64/libgcc_s.so.1
#4  0x003a4572cf46 in dl_iterate_phdr () from /lib64/libc.so.6
#5  0x003a49a11ad2 in _Unwind_Find_FDE () from /lib64/libgcc_s.so.1
#6  0x003a49a0efeb in ?? () from /lib64/libgcc_s.so.1
#7  0x003a49a0fafb in _Unwind_RaiseException () from /lib64/libgcc_s.so.1
#8  0x003a52e5ef41 in __cxa_throw () from /lib64/libstdc++.so.6
#9  0x77ffb25a in libbar () at lib.cpp:6
#10 0x7fffe3e8 in ?? ()
#11 0x004030c8 in ?? ()
#12 0x003a459b1f40 in ?? () from /lib64/libc.so.6
#13 0x in ?? ()
(gdb) q
A debugging session is active.

Inferior 1 [process 6370] will be killed.

Quit anyway? (y or n) y
[innocent@pcphsftkepler ex43581]$ c++ -v
Using built-in specs.
COLLECT_GCC=/bin/c++
COLLECT_LTO_WRAPPER=/usr/libexec/gcc/x86_64-redhat-linux/4.7.0/lto-wrapper
Target: x86_64-redhat-linux
Configured with: ../configure --prefix=/usr --mandir=/usr/share/man
--infodir=/usr/share/info --with-bugurl=http://bugzilla.redhat.com/bugzilla
--enable-bootstrap --enable-shared --enable-threads=posix
--enable-checking=release --disable-build-with-cxx
--disable-build-poststage1-with-cxx --with-system-zlib --enable-__cxa_atexit
--disable-libunwind-exceptions --enable-gnu-unique-object
--enable-linker-build-id --with-linker-hash-style=gnu
--enable-languages=c,c++,objc,obj-c++,java,fortran,ada,go,lto --enable-plugin
--enable-initfini-array --enable-java-awt=gtk --disable-dssi
--with-java-home=/usr/lib/jvm/java-1.5.0-gcj-1.5.0.0/jre
--enable-libgcj-multifile --enable-java-maintainer-mode
--wi

[Bug tree-optimization/53703] [4.8 Regression] verify_ssa: definition in block 105 does not dominate use in block 103

2012-06-18 Thread wschmidt at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=53703

William J. Schmidt  changed:

   What|Removed |Added

 Status|ASSIGNED|RESOLVED
 Resolution||FIXED

--- Comment #4 from William J. Schmidt  2012-06-18 
12:23:34 UTC ---
Fixed.


[Bug tree-optimization/53703] [4.8 Regression] verify_ssa: definition in block 105 does not dominate use in block 103

2012-06-18 Thread wschmidt at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=53703

--- Comment #3 from William J. Schmidt  2012-06-18 
12:22:40 UTC ---
Author: wschmidt
Date: Mon Jun 18 12:22:37 2012
New Revision: 188731

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=188731
Log:
gcc:

2012-06-18  Bill Schmidt  

PR tree-optimization/53703
* tree-ssa-phiopt.c (hoist_adjacent_loads): Skip virtual phis;
correctly set bb_for_def[12].

gcc/testsuite:

2012-06-18  Bill Schmidt  

PR tree-optimization/53703
* gcc.dg/torture/pr53703.c: New test.

Added:
trunk/gcc/testsuite/gcc.dg/torture/pr53703.c
Modified:
trunk/gcc/ChangeLog
trunk/gcc/testsuite/ChangeLog
trunk/gcc/tree-ssa-phiopt.c


[Bug testsuite/43759] The tests gcc.dg/plugindir*.c should be restricted to builds configured with --enable-plugin

2012-06-18 Thread dominiq at lps dot ens.fr
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=43759

Dominique d'Humieres  changed:

   What|Removed |Added

 Status|UNCONFIRMED |RESOLVED
 Resolution||FIXED

--- Comment #7 from Dominique d'Humieres  2012-06-18 
12:10:53 UTC ---
> Any plan to backport the fix to 4.5? or should this pr closed as fixed?

No answer after more than one year;-(closing as fixed).


[Bug testsuite/52945] FAIL: gcc.dg/lto/pr52634 c_lto_pr52634_1.o assemble, -O* -flto *

2012-06-18 Thread dominiq at lps dot ens.fr
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=52945

--- Comment #3 from Dominique d'Humieres  2012-06-18 
11:47:57 UTC ---
Using dg-require-weak does not fix the failures, but the test is skipped with
the following patch:

--- ../_clean/gcc/testsuite/gcc.dg/lto/pr52634_0.c2012-04-10
08:58:02.0 +0200
+++ gcc/testsuite/gcc.dg/lto/pr52634_0.c2012-06-17 15:37:54.0 +0200
@@ -1,3 +1,4 @@
+/* { dg-require-alias "" } */
 /* { dg-lto-do link } */
 /* { dg-lto-options {{-flto -r -nostdlib -flto-partition=1to1}} */
 extern int cfliteValueCallBacks;

Is it the RIGHT way to fix this PR?


[Bug c++/53707] compiler generates wrong code

2012-06-18 Thread galtgendo at o2 dot pl
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=53707

--- Comment #10 from Rafał Mużyło  2012-06-18 11:13:20 
UTC ---
Now, for an interesting note:
if instead of 'string test(n);' I put 'printf("%d\n", n);', not only the bug
*still* happens, but the result if funny:
first a '0' gets printed, but after that only '1' does.

So, it seems n++ of the loop is done only once.


[Bug bootstrap/53681] s390 bootstrap failure since 187965

2012-06-18 Thread matz at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=53681

Michael Matz  changed:

   What|Removed |Added

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

--- Comment #8 from Michael Matz  2012-06-18 11:08:49 
UTC ---
(In reply to comment #5)
> ?! You appear to have added the call to mark_sym_for_renaming with your patch.

Yikes!

> Since it isn't mentioned in the changelog perhaps it is a leftover from
> something else in your tree? So the solution is to revert that change?

Yes, it was an unintended change (it must have been in my dev tree quite long,
I don't remember doing it).  It seems I haven't reviewed the file list
of my commit message :-/  Sorry about that breakage.

--- Comment #9 from Michael Matz  2012-06-18 11:09:28 
UTC ---
.


[Bug bootstrap/53681] s390 bootstrap failure since 187965

2012-06-18 Thread matz at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=53681

Michael Matz  changed:

   What|Removed |Added

 Status|RESOLVED|UNCONFIRMED
 Resolution|FIXED   |

--- Comment #8 from Michael Matz  2012-06-18 11:08:49 
UTC ---
(In reply to comment #5)
> ?! You appear to have added the call to mark_sym_for_renaming with your patch.

Yikes!

> Since it isn't mentioned in the changelog perhaps it is a leftover from
> something else in your tree? So the solution is to revert that change?

Yes, it was an unintended change (it must have been in my dev tree quite long,
I don't remember doing it).  It seems I haven't reviewed the file list
of my commit message :-/  Sorry about that breakage.


[Bug bootstrap/53681] s390 bootstrap failure since 187965

2012-06-18 Thread krebbel at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=53681

Andreas Krebbel  changed:

   What|Removed |Added

 Status|UNCONFIRMED |RESOLVED
 Resolution||FIXED

--- Comment #7 from Andreas Krebbel  2012-06-18 
11:06:39 UTC ---
(In reply to comment #6)
Ok. I've reverted the s390.c bits of r187965.


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

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

--- Comment #4 from Richard Guenther  2012-06-18 
10:56:23 UTC ---
Fact is we detect

  D.2215_20 = (int) gh_18;
  D.2216_21 = D.2215_20 << 5;
  D.2217_22 = (signed short) D.2216_21;

but do not see the use

  D._27 = D.2211_15 - D.2215_20;

for some reason and thus set STMT_IN_PATTER_P on the D.2215_20 def and fail
to vectorize it.  I am testing a patch.


[Bug c++/53707] compiler generates wrong code

2012-06-18 Thread galtgendo at o2 dot pl
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=53707

--- Comment #9 from Rafał Mużyło  2012-06-18 10:43:50 
UTC ---
The code is not mine and it's about as convoluted (if not more) as freeciv was
(that was the *initial* part of bug 39333 - the upstream workaround was
http://svn.gna.org/viewcvs/freeciv/trunk/client/gui-gtk-2.0/wldlg.c?r1=13570&r2=13617).
Anyway, changing enum to static const doesn't help.


[Bug target/53682] [4.7/4.8 Regression] ICE in cselib_lookup (SEGV) on i586-linux-gnu

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

Alexandre Oliva  changed:

   What|Removed |Added

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

--- Comment #3 from Alexandre Oliva  2012-06-18 
10:31:09 UTC ---
Mine.  AFAICT the problem is that promote_debug_loc crashes when the loc list
for a VALUE is temporarily cleared within alias.c to avoid infinite recursion. 
Getting it to return if passed a NULL pointer seems to be the correct fix. 
AFAICT we won't run into this except within var-tracking.

--- Comment #4 from Alexandre Oliva  2012-06-18 
10:32:01 UTC ---
Mine.  AFAICT the problem is that promote_debug_loc crashes when the loc list
for a VALUE is temporarily cleared within alias.c to avoid infinite recursion. 
Getting it to return if passed a NULL pointer seems to be the correct fix. 
AFAICT we won't run into this except within var-tracking.


[Bug target/53682] [4.7/4.8 Regression] ICE in cselib_lookup (SEGV) on i586-linux-gnu

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

Alexandre Oliva  changed:

   What|Removed |Added

 Status|NEW |ASSIGNED

--- Comment #3 from Alexandre Oliva  2012-06-18 
10:31:09 UTC ---
Mine.  AFAICT the problem is that promote_debug_loc crashes when the loc list
for a VALUE is temporarily cleared within alias.c to avoid infinite recursion. 
Getting it to return if passed a NULL pointer seems to be the correct fix. 
AFAICT we won't run into this except within var-tracking.


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

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

--- Comment #3 from Richard Guenther  2012-06-18 
10:22:24 UTC ---
Reduced testcase, it seems we are getting conflicts between two patterns.

void
filter_scanlines (void *src_buffer, void *dst_buffer, int dst_pitch, int width)
{
  int x;
  unsigned short *src, *dst_a, *dst_b;

  src = (unsigned short *) src_buffer;
  dst_a = (unsigned short *) dst_buffer;
  dst_b = ((unsigned short *) dst_buffer) + (dst_pitch >> 1);

  for (x = 0; x < width; x++)
{
  unsigned char gs, gh;
  gs = src[x];
  gh = gs + (gs >> 1);
  dst_a[x] = (gh << 5) | (gh);
  dst_b[x] = ((gs  - gh) << 5)  | (gs  - gh);
}
}


[Bug c++/53707] compiler generates wrong code

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

--- Comment #8 from Richard Guenther  2012-06-18 
10:04:36 UTC ---
Btw, when removing the 'string test(n)' line the function gets inlined and
eliminated, so that is not of much help.


[Bug target/53712] Does not combine unaligned load with _mm_cmpistri, redundant instruction at -O0

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

--- Comment #2 from Uros Bizjak  2012-06-18 10:03:11 
UTC ---
(In reply to comment #1)

> the testcase works as expected.  Still with the "redundant"(?) instruction
> though.  Thus your source is invalid but the missed-optimization looks
> odd (though it's only there at -O0).  It also misses to combine the
> unaligned load into the cmpistri instruction.

The "redundant" insn is there by design, the splitter for pcmpistri insn checks
for dead outputs. Since at -O0 liveness analysis isn't run, we split to both
forms of pcmpistri instructions.

I will add _unaligned forms of pcmistri that will consume UNSPEC_MOVU operator.


[Bug libstdc++/53673] Add magic weak symbol to indicate C++ standard setting (C++03, C++11 etc) to help debug ABI problems

2012-06-18 Thread s_gccbugzilla at nedprod dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=53673

--- Comment #10 from Niall Douglas  
2012-06-18 10:01:19 UTC ---
(In reply to comment #9)
> I'm ambivalent.

Ok then. Well, thanks for all your help and very useful input. As we have
something now which is very close to a code patch, I suppose we leave it for
now and see how the issue tracks into the future.

I encourage anyone supporting the addition of this feature, or otherwise having
C++11 and C++98 interop problems to subscribe here and to indicate their
support. If you don't indicate support it won't get added.

If we get enough support I'm happy to write the documentation patch. Not so the
code patch - too much paperwork as I learned the hard way last time with my
-fvisibility=X patch :)

Thanks,
Niall


[Bug middle-end/53708] [4.8 Regression] Many failures of the objc tests with -O3 -fnext-runtime and -m32

2012-06-18 Thread dominiq at lps dot ens.fr
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=53708

--- Comment #3 from Dominique d'Humieres  2012-06-18 
09:59:55 UTC ---
> ok if it passes bootstrap & regtesting for you.

Clean bootstrap®testing scheduled for tonight. Meanwhile with a simple
update of revision 188723 and objc testing only, the patch in comment #2 fixes
the failures:

=== objc Summary for unix/-m64 ===

# of expected passes6051
# of expected failures14
# of unsupported tests91

=== objc Summary ===

# of expected passes12150
# of expected failures20
# of unsupported tests176

Thanks for the quick fix.


[Bug c++/53672] gcc/branches/cilkplus does not like C++ spawn (when optimized)

2012-06-18 Thread jjhforrest at gmail dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=53672

--- Comment #9 from John Forrest  2012-06-18 
09:59:11 UTC ---
Balaji,

That works and on a few other cases I have altered back.

Hopefully that is that.

Thanks

John
On 18/06/12 03:08, bviyer at gcc dot gnu.org wrote:
> http://gcc.gnu.org/bugzilla/show_bug.cgi?id=53672
>
> --- Comment #8 from bviyer at gcc dot gnu.org 2012-06-18 02:08:03 UTC ---
> Author: bviyer
> Date: Mon Jun 18 02:07:54 2012
> New Revision: 188722
>
> URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=188722
> Log:
> This patch should fix the 2nd case of PR 53672.
> 2012-06-17  Balaji V. Iyer
>
>  PR 53672
>  * dwarf2out.c (dwarf2out_abstract_function): Added a check for the
>  spawn helper.
>  (dwarf2out_function_decl): Added a check if CILK_FN_P is set when there
>  is no function struct.
>  * cilk.c (expand_builtin_cilk_metadata): Set the CILK_FN_P field to 1.
>  * cilk-spawn.c (cg-hacks): Likewise.
>  (gimplify_cilk_for_2): Likewise.
>  (gimplify_cilk_for): Likewise.
>  * tree.h (CILK_FN_P): Added new #define to access a base field of tree.
>
>
> Modified:
>  branches/cilkplus/gcc/ChangeLog.cilk
>  branches/cilkplus/gcc/cilk-spawn.c
>  branches/cilkplus/gcc/cilk.c
>  branches/cilkplus/gcc/cp/ChangeLog.cilk
>  branches/cilkplus/gcc/cp/cilk.c
>  branches/cilkplus/gcc/dwarf2out.c
>  branches/cilkplus/gcc/tree.h
>


[Bug c++/53707] compiler generates wrong code

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

--- Comment #7 from Richard Guenther  2012-06-18 
09:58:58 UTC ---
(In reply to comment #6)
> (In reply to comment #5)
> > The wrong code here seems to be 'n' treated as a constant - there was a bug
> > (regarding freeciv, IIRC) of a similar case for an older gcc version.
> > 
> > As for gcc 4.6.4, when will it be released ?
> 
> GCC 4.6.4 is already released.

Err no, my fault.  Looking at the wrong place.


[Bug c++/53707] compiler generates wrong code

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

--- Comment #6 from Richard Guenther  2012-06-18 
09:58:04 UTC ---
(In reply to comment #5)
> The wrong code here seems to be 'n' treated as a constant - there was a bug
> (regarding freeciv, IIRC) of a similar case for an older gcc version.
> 
> As for gcc 4.6.4, when will it be released ?

GCC 4.6.4 is already released.

Btw, I see

private:
  enum : unsigned { Codes = 128 };
  struct Cheat {
string code;
string desc;
  };
  Cheat cheat[Codes];

and supposedly that array is being accessed.  I have no idea what the
'enum : unsigned { Codes = 128 }' syntax is about.  Is the bug going
away if you change that to use C++98 only features (like for example
using a const unsigned int Codes = 128;)


[Bug rtl-optimization/53706] [4.8 Regression] Bootstrap failure due to "Invalid write of size 8 at 0xBDC35E: variable_htab_free (var-tracking.c:1418)

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

--- Comment #7 from Alexandre Oliva  2012-06-18 
09:50:01 UTC ---
It's a bit surprising, but I guess it makes sense.  I'd reorder the
initializers too, so that we release stuff in the reverse order of allocation.


[Bug c++/53707] compiler generates wrong code

2012-06-18 Thread galtgendo at o2 dot pl
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=53707

--- Comment #5 from Rafał Mużyło  2012-06-18 09:46:17 
UTC ---
The wrong code here seems to be 'n' treated as a constant - there was a bug
(regarding freeciv, IIRC) of a similar case for an older gcc version.

As for gcc 4.6.4, when will it be released ?


[Bug bootstrap/52887] Bootstrap on AIX failure: Undefined symbol: .std::function::function(std::function

2012-06-18 Thread joerg.rich...@pdv-fs.de
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=52887

--- Comment #10 from joerg.rich...@pdv-fs.de 2012-06-18 09:44:30 UTC ---
Created attachment 27649
  --> http://gcc.gnu.org/bugzilla/attachment.cgi?id=27649
Fix for undefined references

Patch for 4.7.1 with the two missing instantiations.
Works for me.  Not tested with GCC testsuite.
Please consider this for 4.7.2


[Bug libstdc++/53713] undefined reference with -brtl

2012-06-18 Thread joerg.rich...@pdv-fs.de
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=53713

--- Comment #2 from joerg.rich...@pdv-fs.de 2012-06-18 09:39:55 UTC ---
(In reply to comment #1)
> probably related to PR 52887

Yes, seems to be the same bug.  But I've used --disable-bootstrap.

I am testing the proposed fixes for PR 52887 and will submit a patch if it
works.


[Bug fortran/53714] New: false positive for -Wuninitialized

2012-06-18 Thread ajmay81 at googlemail dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=53714

 Bug #: 53714
   Summary: false positive for -Wuninitialized
Classification: Unclassified
   Product: gcc
   Version: 4.7.1
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: fortran
AssignedTo: unassig...@gcc.gnu.org
ReportedBy: ajma...@googlemail.com


Fortran code:

  subroutine test(na,nb,nc)
  implicit none
  integer, intent(in) :: na, nb, nc
  integer ia, ib, ic, itest
  do ia=1,na
   do ib=1,nb
do ic=1,nc
 itest=ic
enddo
   enddo
  enddo
  do ic=1,nc
   write (6,*) ic
  enddo
  end

/opt/gcc/4.7.1/bin/gfortran -c -O1 -Wuninitialized test.f
test.f: In function ‘test’:
test.f:4:0: warning: ‘ic’ may be used uninitialized in this function
[-Wuninitialized]

Not seen with zero optimization, but for -O1 and greater the compiler reports
that 'ic' may be uninitialized.

Removing the do-loop at the end of the subroutine removes the warning, even
though it seems unrelated to the location of the alleged uninitialized case.

Removing either of the ia or ib loops (which do nothing) also removes the
warning.

Seen with 4.7.1 built from source.


[Bug target/53698] [4.8 Regression] ICE: in plus_constant, at explow.c:88 with -O -mx32 -maddress-mode=long -fno-tree-dominator-opts

2012-06-18 Thread rsandifo at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=53698

--- Comment #4 from rsandifo at gcc dot gnu.org  
2012-06-18 09:32:56 UTC ---
Author: rsandifo
Date: Mon Jun 18 09:32:51 2012
New Revision: 188725

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=188725
Log:
gcc/
PR middle-end/53698
* expr.c (expand_expr_addr_expr_1): Convert to tmode before
performing an addition.

gcc/testsuite/
PR middle-end/53698
* gcc.target/i386/pr53698.c: New test.

Added:
trunk/gcc/testsuite/gcc.target/i386/pr53698.c
Modified:
trunk/gcc/ChangeLog
trunk/gcc/expr.c
trunk/gcc/testsuite/ChangeLog


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

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

Richard Guenther  changed:

   What|Removed |Added

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

--- Comment #2 from Richard Guenther  2012-06-18 
09:11:00 UTC ---
Confirmed, mine.


[Bug middle-end/53695] [4.8 Regression] ICE: in dfs_enumerate_from, at cfganal.c:1221 with -O2 -ftracer and labels/gotos

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

Richard Guenther  changed:

   What|Removed |Added

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

--- Comment #2 from Richard Guenther  2012-06-18 
09:03:22 UTC ---
Mine.


[Bug middle-end/53696] [4.7/4.8 Regression] ICE: SIGSEGV in gimplify_decl_expr (gimplify.c:1454) with -fkeep-inline-functions on invalid use of lambda

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

Richard Guenther  changed:

   What|Removed |Added

   Target Milestone|--- |4.7.2


[Bug rtl-optimization/53700] [4.7 regression] ICE in reload_cse_simplify_operands, at postreload.c:403

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

Richard Guenther  changed:

   What|Removed |Added

   Keywords||ra
 Target||i?86-*-*
 Status|UNCONFIRMED |NEW
   Last reconfirmed||2012-06-18
 CC||vmakarov at gcc dot gnu.org
   Target Milestone|--- |4.7.2
 Ever Confirmed|0   |1

--- Comment #5 from Richard Guenther  2012-06-18 
09:01:52 UTC ---
Vlad?


[Bug c++/53707] compiler generates wrong code

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

Richard Guenther  changed:

   What|Removed |Added

 Status|UNCONFIRMED |WAITING
   Last reconfirmed||2012-06-18
  Known to work||4.7.1
 Ever Confirmed|0   |1
  Known to fail||4.6.3

--- Comment #4 from Richard Guenther  2012-06-18 
08:55:36 UTC ---
It's hard to analyze a miscompile with a compile-time only testcase.  Please
try to produce a testcase that can be linked and executed and that fails
when miscompiled and succeeds when not.

Also please try the 4.6.4 release.


[Bug middle-end/53708] [4.8 Regression] Many failures of the objc tests with -O3 -fnext-runtime and -m32

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

Richard Guenther  changed:

   What|Removed |Added

   Target Milestone|--- |4.8.0

--- Comment #2 from Richard Guenther  2012-06-18 
08:51:33 UTC ---
I suppose vect_can_force_dr_alignment_p should be restricted more.  Can you
try

Index: gcc/tree-vect-data-refs.c
===
--- gcc/tree-vect-data-refs.c   (revision 188662)
+++ gcc/tree-vect-data-refs.c   (working copy)
@@ -4731,6 +4720,12 @@ vect_can_force_dr_alignment_p (const_tre
   if (TREE_ASM_WRITTEN (decl))
 return false;

+  /* Do not override explicit alignment set by the user or the alignment
+ as specified by the ABI when the used attribute is set.  */
+  if (DECL_USER_ALIGN (decl)
+  || DECL_PRESERVE_P (decl))
+return false;
+
   if (TREE_STATIC (decl))
 return (alignment <= MAX_OFILE_ALIGNMENT);
   else

ok if it passes bootstrap & regtesting for you.


[Bug target/53712] Does not combine unaligned load with _mm_cmpistri, redundant instruction at -O0

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

Richard Guenther  changed:

   What|Removed |Added

 Target||x86_64-*-*
 Status|UNCONFIRMED |NEW
   Keywords||missed-optimization
   Last reconfirmed||2012-06-18
 CC||uros at gcc dot gnu.org
 Ever Confirmed|0   |1
Summary|SEGV in generated code for  |Does not combine unaligned
   |_mm_cmpistri with unaligned |load with  _mm_cmpistri,
   |operand when using -O0  |redundant instruction at
   ||-O0
  Known to fail||4.8.0

--- Comment #1 from Richard Guenther  2012-06-18 
08:45:51 UTC ---
You have an unaligned load in the _mm_cmpistri arguments:

  * (const __m128i *) (s1)

s1 is not properly aligned.

At -O0 _mm_cmpistri is a macro while with optimization it is an inline
function.  Not sure where the pcmpistrm instruction is from.

Using

#include 
#include 

int test( const char* s1, const char * s2 )
{
__m128i s1chars = _mm_loadu_si128( (const __m128i *) s2 );
__m128i s2chars = _mm_loadu_si128( (const __m128i *) (s1));
return _mm_cmpistri( s1chars, s2chars, _SIDD_CMP_EQUAL_ANY );
}

int main( int argc, char * argv[] )
{
const char* s1 = "1234567890b1234567890";
const char* s2 = "abcdefghijklmnop";

int r = test( s1, s2 );
fprintf( stderr, "\nResult: %d", r );
r = test( s1, s2+1 ); // misaligned s2
fprintf( stderr, "\nResult: %d", r );
return 0;
}

the testcase works as expected.  Still with the "redundant"(?) instruction
though.  Thus your source is invalid but the missed-optimization looks
odd (though it's only there at -O0).  It also misses to combine the
unaligned load into the cmpistri instruction.


[Bug libstdc++/53713] undefined reference with -brtl

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

--- Comment #1 from Jonathan Wakely  2012-06-18 
08:31:12 UTC ---
probably related to PR 52887


[Bug bootstrap/53681] s390 bootstrap failure since 187965

2012-06-18 Thread rguenther at suse dot de
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=53681

--- Comment #6 from rguenther at suse dot de  
2012-06-18 08:24:51 UTC ---
On Mon, 18 Jun 2012, krebbel at gcc dot gnu.org wrote:

> http://gcc.gnu.org/bugzilla/show_bug.cgi?id=53681
> 
> --- Comment #5 from Andreas Krebbel  2012-06-18 
> 07:09:04 UTC ---
> (In reply to comment #4)
> > I don't see how r187965 could cause this, but I do see the problem.
> > mark_sym_for_renaming (called via the s390 va_arg_expr expander) is called
> > during, well, gimplification from GENERIC.  At that point SSA isn't
> > initialized yet, so cfun->gimple_df is still NULL, and so SYMS_TO_RENAME
> > gives a segfault.
> > 
> > You either have to guard the call to mark_sym_for_renaming with
> > gimple_in_ssa_p(), or get rid of the call alltogether.  I don't see how
> > new va_arg expressions would be generated during SSA optimizers, so the 
> > latter
> > solution would be safe.  No other backend calls mark_sym_for_renaming 
> > either,
> > so just remove it.
> 
> ?! You appear to have added the call to mark_sym_for_renaming with your patch.
> Since it isn't mentioned in the changelog perhaps it is a leftover from
> something else in your tree? So the solution is to revert that change?
> 
> svn diff -r 187964:187965 gcc/config/s390/s390.c
> Index: gcc/config/s390/s390.c
> ===
> --- gcc/config/s390/s390.c  (revision 187964)
> +++ gcc/config/s390/s390.c  (revision 187965)
> @@ -9044,6 +9044,7 @@
>lab_false = create_artificial_label (UNKNOWN_LOCATION);
>lab_over = create_artificial_label (UNKNOWN_LOCATION);
>addr = create_tmp_var (ptr_type_node, "addr");
> +  mark_sym_for_renaming (addr);

I think that change is indeed bogus as-is, if you ever call this
when we are in SSA form you'd need that call, but you need to guard
it with if (gimple_in_ssa_p (cfun)).

But I'm sure we never gimplify va-arg stuff when in SSA form.

Richard.


[Bug libstdc++/53713] New: undefined reference with -brtl

2012-06-18 Thread joerg.rich...@pdv-fs.de
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=53713

 Bug #: 53713
   Summary: undefined reference with -brtl
Classification: Unclassified
   Product: gcc
   Version: unknown
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: libstdc++
AssignedTo: unassig...@gcc.gnu.org
ReportedBy: joerg.rich...@pdv-fs.de


$ g++ -v
Using built-in specs.
COLLECT_GCC=g++
COLLECT_LTO_WRAPPER=/tools/pkg/gcc/4.7.1/libexec/gcc/powerpc-ibm-aix5.3.0.0/4.7.1/lto-wrapper
Target: powerpc-ibm-aix5.3.0.0
Configured with: gcc-4.7.1/configure --enable-languages=c,c++
--disable-bootstrap --disable-nls --with-local-prefix=/not_existing_directory
--prefix=/tools/pkg/gcc/4.7.1 --with-ld=/bin/ld --with-as=/bin/as
Thread model: aix
gcc version 4.7.1 (GCC)

$ cat t.cc
#include 
int main( int argc, char** argv )
{
  std::string s;
}

$ g++ -Wl,-brtl -o t t.cc

$ t
Could not load program t:
rtld: 0712-001 Symbol
_ZNSt8functionIFvRKNSt7__regex14_PatternCursorERNS0_8_ResultsEEEC1ERKS7_ was
referenced from module
/tools/pkg/gcc/4.7.1/lib/gcc/powerpc-ibm-aix5.3.0.0/4.7.1/../../../libstdc++.a(libstdc++.so.6),
but a runtime definition of the symbol was not found.
rtld: 0712-001 Symbol _ZNSt8functionIFbRKNSt7__regex14_PatternCursorEEEC1ERKS5_
was referenced from module
/tools/pkg/gcc/4.7.1/lib/gcc/powerpc-ibm-aix5.3.0.0/4.7.1/../../../libstdc++.a(libstdc++.so.6),
but a runtime definition of the symbol was not found.


[Bug rtl-optimization/53706] [4.8 Regression] Bootstrap failure due to "Invalid write of size 8 at 0xBDC35E: variable_htab_free (var-tracking.c:1418)

2012-06-18 Thread jakub at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=53706

--- Comment #6 from Jakub Jelinek  2012-06-18 
07:50:33 UTC ---
Created attachment 27648
  --> http://gcc.gnu.org/bugzilla/attachment.cgi?id=27648
gcc48-pr53706.patch

The attached patch fixes the problem for me.  Alex, what do you think about it?


Re: [BUG middle-end] Optimizations are deleting my adds

2012-06-18 Thread miloutch

Nobody have the answer ?
I'm desperate ... :(

miloutch wrote:
> 
> Hi, 
> 
> I have a small problem. I am making a new pass for my gcc, and some of my
> adds are deleted by optimization passes.
> here is the code i add :
> 
> t = builtin_decl_explicit (BUILT_IN_ACC_SETUPARGUMENT);
> g = gimple_build_call(t,
>   3,
>   build1(ADDR_EXPR, integer_ptr_type_node, length),
>   
> build_int_cst(integer_type_node,TREE_INT_CST_LOW(TYPE_SIZE_UNIT
> (TREE_TYPE (tmp_result,
>   offset
>);
> gsi_insert_before (&gsi, g, GSI_SAME_STMT);
> 
> you see, the variable length wich is actually "length.0" ->
> gimple_omp_for_final() is renamed by ssa pass in length_1(D)
> But, here is an ADDR_EXPR of length, and the optimization don't rename it,
> so it points to the wrong variable because length.0 is not used anymore
> after the optimizations.
> 
> I want to know if there is a way to prevent the compiler from optimizing
> this code with a flag in my code for example ?
> Thanks in advance !
> 

-- 
View this message in context: 
http://old.nabble.com/-BUG-middle-end--Optimizations-are-deleting-my-adds-tp34012207p34028377.html
Sent from the gcc - bugs mailing list archive at Nabble.com.



[Bug bootstrap/53681] s390 bootstrap failure since 187965

2012-06-18 Thread krebbel at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=53681

--- Comment #5 from Andreas Krebbel  2012-06-18 
07:09:04 UTC ---
(In reply to comment #4)
> I don't see how r187965 could cause this, but I do see the problem.
> mark_sym_for_renaming (called via the s390 va_arg_expr expander) is called
> during, well, gimplification from GENERIC.  At that point SSA isn't
> initialized yet, so cfun->gimple_df is still NULL, and so SYMS_TO_RENAME
> gives a segfault.
> 
> You either have to guard the call to mark_sym_for_renaming with
> gimple_in_ssa_p(), or get rid of the call alltogether.  I don't see how
> new va_arg expressions would be generated during SSA optimizers, so the latter
> solution would be safe.  No other backend calls mark_sym_for_renaming either,
> so just remove it.

?! You appear to have added the call to mark_sym_for_renaming with your patch.
Since it isn't mentioned in the changelog perhaps it is a leftover from
something else in your tree? So the solution is to revert that change?

svn diff -r 187964:187965 gcc/config/s390/s390.c
Index: gcc/config/s390/s390.c
===
--- gcc/config/s390/s390.c  (revision 187964)
+++ gcc/config/s390/s390.c  (revision 187965)
@@ -9044,6 +9044,7 @@
   lab_false = create_artificial_label (UNKNOWN_LOCATION);
   lab_over = create_artificial_label (UNKNOWN_LOCATION);
   addr = create_tmp_var (ptr_type_node, "addr");
+  mark_sym_for_renaming (addr);

   t = fold_convert (TREE_TYPE (reg), size_int (max_reg));
   t = build2 (GT_EXPR, boolean_type_node, reg, t);