[Bug rtl-optimization/51505] [4.5/4.6/4.7 Regression] ICE: in form_sum, at reload.c:5349 with -O --param max-cse-insns=1

2011-12-13 Thread jakub at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=51505

Jakub Jelinek  changed:

   What|Removed |Added

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

--- Comment #2 from Jakub Jelinek  2011-12-13 
08:29:00 UTC ---
Reload is innocent here.
IMHO the problem is that we have a REG_EQUAL note that refers to dead pseudos,
perhaps DF should just remove such notes?  Or it might be combiner fault.
Before combine we have:
(insn 30 2 5 2 (set (reg/v:QI 59 [ i ])
(const_int 0 [0])) pr51505.c:14 -1
 (nil))

(insn 5 30 6 2 (set (reg:SI 60 [ D.1713 ])
(sign_extend:SI (reg/v:QI 59 [ i ]))) pr51505.c:14 130 {extendqisi2}
 (expr_list:REG_DEAD (reg/v:QI 59 [ i ])
(nil)))
...
(insn 10 9 11 2 (set (reg:DI 70 [ D.1713 ])
(sign_extend:DI (reg:SI 60 [ D.1713 ]))) pr51505.c:14 124
{*extendsidi2_rex64}
 (expr_list:REG_DEAD (reg:SI 60 [ D.1713 ])
(nil)))

(insn 11 10 12 2 (parallel [
(set (reg:QI 71)
(and:QI (reg:QI 68)
(mem/s/j:QI (plus:DI (plus:DI (reg/f:DI 20 frame)
(reg:DI 70 [ D.1713 ]))
(const_int -768 [0xfd00])) [0 s2.a S1
A8])))
(clobber (reg:CC 17 flags))
]) pr51505.c:14 383 {*andqi_1}
 (expr_list:REG_DEAD (reg:DI 70 [ D.1713 ])
(expr_list:REG_DEAD (reg:QI 68)
(expr_list:REG_UNUSED (reg:CC 17 flags)
(nil)

(insn 12 11 13 2 (set (mem/s/j:QI (plus:DI (plus:DI (reg/f:DI 20 frame)
(reg:DI 66 [ D.1713 ]))
(const_int -1024 [0xfc00])) [0 e S1 A8])
(reg:QI 71)) pr51505.c:14 66 {*movqi_internal}
 (expr_list:REG_DEAD (reg:QI 71)
(expr_list:REG_DEAD (reg:DI 66 [ D.1713 ])
(expr_list:REG_EQUAL (and:QI (reg:QI 68)
(mem/s/j:QI (plus:DI (plus:DI (reg/f:DI 20 frame)
(reg:DI 70 [ D.1713 ]))
(const_int -768 [0xfd00])) [0 s2.a S1
A8]))
(nil)

Note REG_DEAD before insn 12 which uses pseudo 70 in its REG_EQUAL note.
Then during combine we decide to change mode of pseudo 70 from DImode to QImode
and just change it, thinking we've adjusted all places where it was used, but
in fact we adjust the content of the REG_EQUAL note to (and:QI (reg:QI 68)
(mem:QI (plus:DI (plus:DI (reg:DI 20) (reg:QI 70)) (const_int -768.
And of course, as this is not valid RTL, when reload attempts to use the
REG_EQUAL note it ICEs.  Now the combiner changing of pseudo 70 happens I think
when i3 is insn 12, i2 is insn 11 and i1 is insn 10, so in theory the combiner
should be able to do the adjustment of the REG_EQUAL note in there too, but I
wonder if similar mode transformation couldn't happen also when just working on
i3 where the pseudo is dead and some insns that feed it, with the REG_EQUAL
note being in some subsequent insns - then I doubt it would be able to do that.

Eric, what do you think about this?


[Bug libgcj/51498] [4.7 regression] temporary hack to make dejagnu work in libjava

2011-12-13 Thread jakub at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=51498

Jakub Jelinek  changed:

   What|Removed |Added

 CC||jakub at gcc dot gnu.org

--- Comment #4 from Jakub Jelinek  2011-12-13 
08:36:16 UTC ---
None of the testsuite Makefiles for other libraries do anything similar
(libgomp, libstdc++-v3, ..., so why is libjava so special that it needs it?).
make check definitely works just fine for me and uses the newly built gcj etc.
rather than the system gcj.  So please expand on what exact errors you saw,
details from the libjava.log where it shows etc.


[Bug c++/51526] New: [C++11][constexpr] constexpr delegating constructor should be accepted

2011-12-13 Thread daniel.kruegler at googlemail dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=51526

 Bug #: 51526
   Summary: [C++11][constexpr] constexpr delegating constructor
should be accepted
Classification: Unclassified
   Product: gcc
   Version: 4.7.0
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: c++
AssignedTo: unassig...@gcc.gnu.org
ReportedBy: daniel.krueg...@googlemail.com
CC: ja...@gcc.gnu.org


gcc 4.7.0 20111210 (experimental) rejects the following program by producing an
ICE:

//
struct S {
  int i;
  constexpr S(int i) : i(i) {}
  constexpr S() : S(42) {}
};

constexpr S s{};
//

"
main.cpp||In constructor 'constexpr S::S()':|
main.cpp|4|internal compiler error: in build_data_member_initialization, at
cp/semantics.c:5777
"

The code should be accepted, it seems that S::S() satisfies the criteria for a
constexpr constructor as of 7.1.5.


[Bug fortran/51520] [4.6 Regression] ICE in gfortran 4.6.2, x86_64

2011-12-13 Thread burnus at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=51520

Tobias Burnus  changed:

   What|Removed |Added

 CC||burnus at gcc dot gnu.org
   Target Milestone|--- |4.6.3


[Bug c++/51475] [c++0x] [4.7 Regression] ICE with invalid initializer_list

2011-12-13 Thread jakub at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=51475

Jakub Jelinek  changed:

   What|Removed |Added

 Status|UNCONFIRMED |NEW
   Last reconfirmed||2011-12-13
 CC||jakub at gcc dot gnu.org,
   ||jason at gcc dot gnu.org
 Ever Confirmed|0   |1

--- Comment #1 from Jakub Jelinek  2011-12-13 
08:48:52 UTC ---
Started with http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=178790


[Bug c++/42768] ICE: libstdc++-v3/libsupc++/vec.cc:354

2011-12-13 Thread ktietz at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=42768

Kai Tietz  changed:

   What|Removed |Added

 Status|WAITING |RESOLVED
 CC||ktietz at gcc dot gnu.org
 Resolution||WORKSFORME

--- Comment #6 from Kai Tietz  2011-12-13 09:01:11 
UTC ---
This issue seems to be solved.  At least our package-manager on mingw-w64 is
building successfull 4.4.x and 4.5.x g++ toolchains without this error.

So I close it.  If there are more details, user might can reopen it.


[Bug c++/51476] [c++0x] [4.7 Regression] ICE with invalid pointer-to-member template parameter

2011-12-13 Thread jakub at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=51476

Jakub Jelinek  changed:

   What|Removed |Added

 CC||jakub at gcc dot gnu.org

--- Comment #1 from Jakub Jelinek  2011-12-13 
09:07:31 UTC ---
Started with http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=181219


[Bug target/51509] Inefficient neon intrinsic code sequence

2011-12-13 Thread rsandifo at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=51509

--- Comment #1 from rsandifo at gcc dot gnu.org  
2011-12-13 09:07:38 UTC ---
At least part of the problem here is the uninitialised
variable in the vld4 call.  GCC tries to create a zero
initialisation of "x" before the vld4, so that the other
lanes have defined values.  Obviously we could be doing
that much better than we are, and perhaps we should have
some kind of special case so that uninitialised NEON vectors
are never zero-initialised (e.g. use a plain clobber instead).
But uninitialised variables aren't really ideal either way.
Something like:

  x = vld4_dup_u8(src);

  y.val[0][0] = x.val[1][0];
  y.val[1][0] = x.val[2][0];

  vst2_lane_u8(dst, y, 0);

would be better in principle.  Unfortunately, we don't
generate good code for that either.  Part of the problem
is introduced by lower-subreg, but it's not good even
with -fno-split-wide-types.


[Bug java/47456] internal compiler error: Segmentation fault while using jna

2011-12-13 Thread ktietz at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=47456

Kai Tietz  changed:

   What|Removed |Added

 CC||ktietz at gcc dot gnu.org

--- Comment #14 from Kai Tietz  2011-12-13 09:13:38 
UTC ---
The gcc 4.3.x series has reached end of support. Does this failure happens
still with newer gcj version?


[Bug fortran/51520] [4.6 Regression] ICE in gfortran 4.6.2, x86_64

2011-12-13 Thread burnus at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=51520

--- Comment #2 from Tobias Burnus  2011-12-13 
09:18:04 UTC ---
(In reply to comment #0)
> valgrind output:
> ==18442==by 0x52BD26: traverse_ns (symbol.c:)

(In reply to comment #1)
> The ICE seems to have been fixed on trunk between revisions 180989 (ICE)
> and 181881 (OK).

One possibility could be:

r181232 | burnus | 2011-11-09 20:36:54 +0100 (Wed, 09 Nov 2011) | 7 lines
* symbol.c (clear_sym_mark, traverse_ns): Remove functions.
(count_st_nodes, do_traverse_symtree, fill_st_vector): New functions.
(gfc_traverse_symtree, gfc_traverse_ns): Call do_traverse_symtree.

At least I hope for some smaller patch than the big constructor patch (Rev.
181425).

Dominique: Any chance that you could bisect the 4.7 trunk to find the patch
which fixes the ICE? If not, I can do so later. (You might want to use
--disable-bootstrap --disable-build-poststage1-with-cxx and not building C++ to
speed up the bisecting.)


[Bug ada/49084] [4.7 regression] bootstrap failure with Ada enabled

2011-12-13 Thread ktietz at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=49084

--- Comment #18 from Kai Tietz  2011-12-13 09:18:55 
UTC ---
Hmm, other way to solve this might be to add to structure the optional
attribute gcc_struct.  At least I used that to fix libquadmath for 32-bit IA
Windows.


[Bug target/51509] Inefficient neon intrinsic code sequence

2011-12-13 Thread rsandifo at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=51509

--- Comment #2 from rsandifo at gcc dot gnu.org  
2011-12-13 09:20:54 UTC ---
FWIW,

  uint8x8x4_t x;
  uint8x8x2_t y;

  x = vld4_dup_u8(src);

  y.val[0] = x.val[1];
  y.val[1] = x.val[2];

  vst2_lane_u8(dst, y, 0);

does give the expected output.  I.e. the remaining inefficiency
from comment #1 is in the uninitialised parts of y.

Richard


[Bug c++/23885] incorrect template two-stage name-lookup

2011-12-13 Thread rockeet at gmail dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=23885

rockeet  changed:

   What|Removed |Added

 CC||rockeet at gmail dot com

--- Comment #9 from rockeet  2011-12-13 09:35:29 UTC 
---
/ Code Begin
#include 

class A {}; void f(A) { printf("%s\n", __PRETTY_FUNCTION__); }
class B {};
template void f(T) { printf("%s\n", __PRETTY_FUNCTION__); }

// now g(T) knew A,B,int,...
// phase 1 lookup just success for f(A)
template void g(T x) { f(x); }

// after definition of g(T) and class B
void f(B) { printf("%s\n", __PRETTY_FUNCTION__); }

void f(int x) { printf("%s\n", __PRETTY_FUNCTION__); }
void f(int*x) { printf("%s\n", __PRETTY_FUNCTION__); }

int main(int argc, char** argv) {
g(A());   // should always(phase 1 and phase 2) be OK
g(B());   // f(B) definition is after g(T) definition, phase 1 just got
f(A) and f(T)
g(B());   //  but phase 2 got f(B)
g(100);   // intend to let g calling f(int), but got f(T) in g++ 4.1.2 and
4.6.0, 4.7.0, others not tested
g(&argc); // intention: similar as g(100)
return 0;
}
/ Code End

The output of above code shown that "associated sets of namespaces and
classes of fundamental types are both empty" is really true! But pre g++ 3.4.6
and clang treat fundamental types as same as user defined types.

 Begin Compile With g++ 4.6.0
$g++ -v
Using built-in specs.
COLLECT_GCC=g++
COLLECT_LTO_WRAPPER=/opt/libexec/gcc/x86_64-unknown-linux-gnu/4.6.0/lto-wrapper
Target: x86_64-unknown-linux-gnu
Configured with: ../gcc-4.6.0-src/configure --prefix=/opt --with-gmp=/opt
--with-mpfr=/opt --with-mpc=/opt --with-ppl=/opt --with-cloog=/opt
--with-local-prefix=/opt --enable-languages=c,c++
Thread model: posix
gcc version 4.6.0 (GCC) 
$ g++ twophaselookup2.cpp
$ ./a.out 
 End Compile With g++ 4.6.0

 Begin Compile With g++ 3.4.6
void f(A)
void f(B)
void f(B)
void f(int)
void f(int*)
 Begin Compile With g++ 3.4.6

apple clang produced the same result as g++ 3.4.6


[Bug c++/23885] incorrect template two-stage name-lookup

2011-12-13 Thread rockeet at gmail dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=23885

--- Comment #10 from rockeet  2011-12-13 09:38:45 UTC 
---
Sorry, missed output of g++ 4.6.0:
 Begin Output
void f(A)
void f(B)
void f(B)
void f(T) [with T = int]
void f(T) [with T = int*]
 End Output


[Bug ada/49084] [4.7 regression] bootstrap failure with Ada enabled

2011-12-13 Thread ebotcazou at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=49084

--- Comment #19 from Eric Botcazou  2011-12-13 
10:05:54 UTC ---
> Hmm, other way to solve this might be to add to structure the optional
> attribute gcc_struct.  At least I used that to fix libquadmath for 32-bit IA
> Windows.

Thanks.  Let's avoid gratuitous non-portable stuff though.


[Bug ada/49084] [4.7 regression] bootstrap failure with Ada enabled

2011-12-13 Thread ebotcazou at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=49084

Eric Botcazou  changed:

   What|Removed |Added

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

--- Comment #20 from Eric Botcazou  2011-12-13 
10:07:26 UTC ---
Created attachment 26068
  --> http://gcc.gnu.org/bugzilla/attachment.cgi?id=26068
Tentative fix


[Bug tree-optimization/51254] Missed Optimization: IVOPTS don't handle unaligned memory access.

2011-12-13 Thread rguenther at suse dot de
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=51254

--- Comment #4 from rguenther at suse dot de  
2011-12-13 10:27:48 UTC ---
On Tue, 13 Dec 2011, duyuehai at gmail dot com wrote:

> http://gcc.gnu.org/bugzilla/show_bug.cgi?id=51254
> 
> Yuehai Du  changed:
> 
>What|Removed |Added
> 
>  CC||duyuehai at gmail dot com,
>||rguenth at gcc dot gnu.org
> 
> --- Comment #2 from Yuehai Du  2011-12-13 04:15:12 
> UTC ---
> Hi Richard
>   would it be ok if i submit a patch like this to fix this bug:
> 
> Index: gcc/tree-ssa-loop-ivopts.c
> ===
> --- gcc/tree-ssa-loop-ivopts.c(版本 182270)
> +++ gcc/tree-ssa-loop-ivopts.c(工作副本)
> @@ -102,6 +102,7 @@ along with GCC; see the file COPYING3.  If not see
> cost of different addressing modes.  This should be moved to a TBD
> interface between the GIMPLE and RTL worlds.  */
>  #include "expr.h"
> +#include "optabs.h"
> 
>  /* The infinite cost.  */
>  #define INFTY 1000
> @@ -1771,6 +1772,7 @@ find_interesting_uses_address (struct ivopts_data
>  }
>else
>  {
> +  enum machine_mode mem_mode;
>ifs_ivopts_data.ivopts_data = data;
>ifs_ivopts_data.stmt = stmt;
>ifs_ivopts_data.step = size_zero_node;
> @@ -1786,7 +1788,9 @@ find_interesting_uses_address (struct ivopts_data
> 
>/* Moreover, on strict alignment platforms, check that it is
>   sufficiently aligned.  */
> -  if (STRICT_ALIGNMENT && may_be_unaligned_p (base, step))
> +  mem_mode = TYPE_MODE (TREE_TYPE (*op_p));
> +  if (STRICT_ALIGNMENT && may_be_unaligned_p (base, step)
> +  && optab_handler (movmisalign_optab, mem_mode) == CODE_FOR_nothing)
>  goto fail;
> 
>base = build_fold_addr_expr (base);

This won't fix it - the movmisalign optab will not be used at expansion
time as IVOPTs does not properly transfer the misalignment to the
access type.

Richard.


[Bug libgcj/51498] [4.7 regression] temporary hack to make dejagnu work in libjava

2011-12-13 Thread jojelino at gmail dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=51498

--- Comment #5 from gee  2011-12-13 10:48:50 UTC ---
(In reply to comment #4)
> None of the testsuite Makefiles for other libraries do anything similar
> (libgomp, libstdc++-v3, ..., so why is libjava so special that it needs it?).
> make check definitely works just fine for me and uses the newly built gcj etc.
> rather than the system gcj.  So please expand on what exact errors you saw,
> details from the libjava.log where it shows etc.

/usr/bin/make  check-DEJAGNU
make[1]: Entering directory `/tmp/gcc/i686-pc-mingw32/libjava/testsuite'
Making a new site.exp file...
srcdir=`CDPATH="${ZSH_VERSION+.}:" && cd ../../.././libjava/testsuite && pwd`;
export srcdir; \
EXPECT=`if [ -f ../../expect/expect ] ; then  echo ../../expect/expect ;  else
echo expect ; fi`; export EXPECT; \
runtest="`if [ -f ../../.././libjava/../dejagnu/runtest ] ; then  echo
../../.././libjava/../dejagnu/runtest ;  else echo runtest; fi`
INTERPRETER=yes"; \
if /bin/sh -c "$runtest --version" > /dev/null 2>&1; then \
  exit_status=0; l='libjava'; for tool in $l; do \
if $runtest INTERPRETER=yes --tool $tool --srcdir $srcdir ; \
then :; else exit_status=1; fi; \
  done; \
else echo "WARNING: could not find \`runtest'" 1>&2; :;\
fi; \
exit $exit_status
WARNING: Couldn't find the global config file.
Test Run By Administrator on Tue Dec 13 19:48:20 2011
Target is i686-pc-mingw32
Host   is i686-pc-mingw32
Build  is i686-pc-cygwin

=== libjava tests ===

Schedule of variations:
unix

Running target unix
Using /usr/share/dejagnu/baseboards/unix.exp as board description file for
target.
Using /usr/share/dejagnu/config/unix.exp as generic interface file for target.
Using /tmp/gcc/libjava/testsuite/config/default.exp as tool-and-target-specific
interface file.
WARNING: Assuming target board is the local machine (which is probably wrong).
You may need to set your DEJAGNU environment variable.
Running /tmp/gcc/libjava/testsuite/libjava.cni/cni.exp ...
couldn't execute "gcj": no such file or directory
while executing
"exec gcj -B/tmp/gcc/i686-pc-mingw32/libjava/testsuite/../ -v 2>@ stdout"
("eval" body line 1)
invoked from within
"eval exec "$GCJ_UNDER_TEST -B$specdir -v 2>@ stdout""
(procedure "libjava_init" line 46)
invoked from within
"${tool}_init $test_file_name"
invoked from within
"if [info exists tool] {
if { [info procs "${tool}_init"] != "" } {
${tool}_init $test_file_name;
}
}"
invoked from within
"if [file exists $test_file_name] {
set timestart [timestamp];

if [info exists tool] {
if { [info procs "${tool}_init"] != "" } {
${tool}_ini..."
(procedure "runtest" line 14)
invoked from within
"runtest $test_name"
("foreach" body line 42)
invoked from within
"foreach test_name [lsort [find ${dir} *.exp]] {
if { ${test_name} == "" } {
continue
}
# Ignore this one if asked to.
if { ${ignore..."
("foreach" body line 54)
invoked from within
"foreach dir "${test_top_dirs}" {
if { ${dir} != ${srcdir} } {
# Ignore this directory if is a directory to be
# ignored.
if {[info..."
("foreach" body line 121)
invoked from within
"foreach pass $multipass {

# multipass_name is set for `record_test' to use (see framework.exp).
if { [lindex $pass 0] != "" } {
set multipass_..."
("foreach" body line 51)
invoked from within
"foreach current_target $target_list {
verbose "target is $current_target";
set current_target_name $current_target;
set tlist [split $curr..."
(file "/usr/share/dejagnu/runtest.exp" line 1623)
Makefile:385: recipe for target `check-DEJAGNU' failed
make[1]: *** [check-DEJAGNU] Error 1
make[1]: Leaving directory `/tmp/gcc/i686-pc-mingw32/libjava/testsuite'
Makefile:403: recipe for target `check-am' failed
make: *** [check-am] Error 2


[Bug rtl-optimization/51505] [4.5/4.6/4.7 Regression] ICE: in form_sum, at reload.c:5349 with -O --param max-cse-insns=1

2011-12-13 Thread ebotcazou at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=51505

Eric Botcazou  changed:

   What|Removed |Added

 CC||bonzini at gnu dot org

--- Comment #3 from Eric Botcazou  2011-12-13 
11:02:32 UTC ---
> IMHO the problem is that we have a REG_EQUAL note that refers to dead pseudos,
> perhaps DF should just remove such notes? 

I'd think so.  When DF adds REG_DEAD/REG_UNUSED notes, it knowingly ignores
REG_EQUAL/REG_EQUIV notes (even if you do df_set_flags (DF_EQ_NOTES) before
df_note_add_problem).  That's a reasonable choice, but then it should remove
the latter notes that have become invalid because of the former.

Paolo, would this be easily doable?


[Bug middle-end/51521] [4.7 Regression]: build fails on cris-elf building libstdc++-v3: verify_flow_info failed

2011-12-13 Thread rguenth at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=51521

Richard Guenther  changed:

   What|Removed |Added

 CC||ubizjak at gmail dot com

--- Comment #1 from Richard Guenther  2011-12-13 
11:03:57 UTC ---
*** Bug 51525 has been marked as a duplicate of this bug. ***


[Bug c++/51525] [4.7 Regression] ICE: verify_flow_info_failed in g++.dg/abi/covariant5.C

2011-12-13 Thread rguenth at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=51525

Richard Guenther  changed:

   What|Removed |Added

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

--- Comment #2 from Richard Guenther  2011-12-13 
11:03:57 UTC ---
dup.

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


[Bug target/51523] LTO keeps unneeded functions (mingw32 target)

2011-12-13 Thread rguenth at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=51523

Richard Guenther  changed:

   What|Removed |Added

 Target||mingw32
 Status|UNCONFIRMED |WAITING
   Last reconfirmed||2011-12-13
 Ever Confirmed|0   |1

--- Comment #1 from Richard Guenther  2011-12-13 
11:05:31 UTC ---
I think you need -fwhole-program as mingw32 is not using a linker plugin(?)
If so, this works as intended and the bug is invalid.


[Bug middle-end/51521] [4.7 Regression]: build fails on cris-elf building libstdc++-v3: verify_flow_info failed

2011-12-13 Thread rguenth at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=51521

--- Comment #2 from Richard Guenther  2011-12-13 
11:06:55 UTC ---
The EDGE_FALLTHRU flag is wrong if any of EDGE_TRUE/FALSE_* is added which
is probably what happens.  Thus the patch was wrong.


[Bug target/51523] LTO keeps unneeded functions (mingw32 target)

2011-12-13 Thread ktietz at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=51523

Kai Tietz  changed:

   What|Removed |Added

 Status|WAITING |NEW
 CC||ktietz at gcc dot gnu.org

--- Comment #2 from Kai Tietz  2011-12-13 11:14:38 
UTC ---
mingw use linker-plugin and therefore bug is valid


[Bug middle-end/51521] [4.7 Regression]: build fails on cris-elf building libstdc++-v3: verify_flow_info failed

2011-12-13 Thread dvyukov at google dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=51521

Dmitry Vyukov  changed:

   What|Removed |Added

 CC||dvyukov at google dot com

--- Comment #3 from Dmitry Vyukov  2011-12-13 
11:15:18 UTC ---
Hi Richard,

May you please take a look at this message where I describe why I had done the
change:
http://codereview.appspot.com/5486043/#msg6

The edge w/o EDGE_FALLTHRU also causes internal errors when I try to split it.

> The EDGE_FALLTHRU flag is wrong if any of EDGE_TRUE/FALSE_* is added which
is probably what happens.  Thus the patch was wrong.

But when I set EDGE_FALLTHRU there is no EDGE_TRUE/FALSE_* yet (the flags were
0). So, isn't it who adds EDGE_TRUE/FALSE_* must reset EDGE_FALLTHRU?


[Bug tree-optimization/51519] [4.7 Regression] ICE: in inline_small_functions, at ipa-inline.c:1410 with -O -fno-guess-branch-probability -findirect-inlining

2011-12-13 Thread rguenth at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=51519

Richard Guenther  changed:

   What|Removed |Added

 Status|UNCONFIRMED |ASSIGNED
   Last reconfirmed||2011-12-13
 CC||hubicka at gcc dot gnu.org
 AssignedTo|unassigned at gcc dot   |rguenth at gcc dot gnu.org
   |gnu.org |
   Target Milestone|--- |4.7.0
 Ever Confirmed|0   |1

--- Comment #1 from Richard Guenther  2011-12-13 
11:15:58 UTC ---
Confirmed.  The -fno-guess-branch-probability case still uses the overall
growth in edge_badness.  The following will fix it.

Index: gcc/ipa-inline.c
===
--- gcc/ipa-inline.c(revision 182220)
+++ gcc/ipa-inline.c(working copy)
@@ -861,7 +861,7 @@ edge_badness (struct cgraph_edge *edge,
   else
 {
   int nest = MIN (inline_edge_summary (edge)->loop_depth, 8);
-  badness = estimate_growth (callee) * 256;
+  badness = growth * 256;

   /* Decrease badness if call is nested.  */
   if (badness > 0)


[Bug debug/51517] [4.5/4.6/4.7 Regression] Wrong debug information for pointers with negative strides.

2011-12-13 Thread rguenth at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=51517

Richard Guenther  changed:

   What|Removed |Added

  Known to work||4.4.6
   Target Milestone|--- |4.5.4
Summary|[4.4 regression ] Wrong |[4.5/4.6/4.7 Regression]
   |debug information for   |Wrong debug information for
   |pointers with negative  |pointers with negative
   |strides.|strides.


[Bug ada/49084] [4.7 regression] bootstrap failure with Ada enabled

2011-12-13 Thread ebotcazou at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=49084

--- Comment #21 from Eric Botcazou  2011-12-13 
11:21:32 UTC ---
Author: ebotcazou
Date: Tue Dec 13 11:21:28 2011
New Revision: 182275

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=182275
Log:
PR ada/49084
* types.h (Byte): Change typedef to 'unsigned char'.
* atree.h (struct Flag_Word): Use Byte for 'convention' field.

Modified:
trunk/gcc/ada/ChangeLog
trunk/gcc/ada/atree.h
trunk/gcc/ada/types.h


[Bug tree-optimization/51481] [4.7 Regression] ice: dead STMT in EH table

2011-12-13 Thread rguenth at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=51481

--- Comment #8 from Richard Guenther  2011-12-13 
11:24:44 UTC ---
The following is a real fix I'm going to test.

@@ -1601,6 +1605,7 @@ replace_uses_by (tree name, tree val)
   if (gimple_code (stmt) != GIMPLE_PHI)
{
  gimple_stmt_iterator gsi = gsi_for_stmt (stmt);
+ gimple orig_stmt = stmt;
  size_t i;

  fold_stmt (&gsi);
@@ -1619,7 +1624,7 @@ replace_uses_by (tree name, tree val)
recompute_tree_invariant_for_addr_expr (op);
}

- maybe_clean_or_replace_eh_stmt (stmt, stmt);
+ maybe_clean_or_replace_eh_stmt (orig_stmt, stmt);
  update_stmt (stmt);
}
 }


[Bug ada/49084] [4.7 regression] bootstrap failure with Ada enabled

2011-12-13 Thread ebotcazou at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=49084

Eric Botcazou  changed:

   What|Removed |Added

 Status|ASSIGNED|RESOLVED
 Resolution||FIXED

--- Comment #22 from Eric Botcazou  2011-12-13 
11:27:24 UTC ---
Patch applied.


[Bug target/51523] LTO keeps unneeded functions (mingw32 target)

2011-12-13 Thread rguenth at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=51523

Richard Guenther  changed:

   What|Removed |Added

 Status|NEW |WAITING

--- Comment #3 from Richard Guenther  2011-12-13 
11:30:28 UTC ---
Can you please attach the resolution file then?  It's the file passed
to -fresolution= at WPA stage which should be preserved and
seen with -v -save-temps.

What linker version are you using?


[Bug fortran/41951] [OOP] ICE in gfc_match_varspec, at fortran/primary.c:1815

2011-12-13 Thread burnus at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=41951

--- Comment #8 from Tobias Burnus  2011-12-13 
11:40:51 UTC ---
(In reply to comment #6)
> Given that NAG 5.2 compiles it and as "assign" is only called via
> "assignment(=)", there must be some issue with the assignment resolution.

Actually, I wonder whether the code is valid. One has:

  type, abstract :: sort_t
  contains
generic :: assignment(=) => assign
...

  interface assignment(=)
procedure assign
  end interface

Thus, one defines twice a generic name with the same (= identical) interface,
once as TBP and once as external procedure. Thus, when one encounters:
tmp = a(i)
the compiler has the choice between "assign_" and "tmp->_vtab->assign".

I failed to nail it in the standard, but I am sure that "12.4.3.4.5
Restrictions on generic declarations" somehow must apply.


[Bug c++/51476] [c++0x] [4.7 Regression] ICE with invalid pointer-to-member template parameter

2011-12-13 Thread dodji at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=51476

Dodji Seketeli  changed:

   What|Removed |Added

 Status|UNCONFIRMED |ASSIGNED
   Last reconfirmed||2011-12-13
 CC||dodji at gcc dot gnu.org
 AssignedTo|unassigned at gcc dot   |dodji at gcc dot gnu.org
   |gnu.org |
 Ever Confirmed|0   |1


[Bug c/51527] New: ICE: Segmentation fault: 'convert_to_integer' enters infinite recursion

2011-12-13 Thread gjl at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=51527

 Bug #: 51527
   Summary: ICE: Segmentation fault: 'convert_to_integer' enters
infinite recursion
Classification: Unclassified
   Product: gcc
   Version: 4.7.0
Status: UNCONFIRMED
  Keywords: ice-on-valid-code
  Severity: normal
  Priority: P3
 Component: c
AssignedTo: unassig...@gcc.gnu.org
ReportedBy: g...@gcc.gnu.org
  Host: i686-pc-linux-gnu
Target: avr
 Build: i686-pc-linux-gnu


== Code ==

void test_1 (void)
{
  int i;

  // notice it works with __uint24
  __int24 a, b;

  for (i = 0; i < 500; i++)
  {
  if (i & 1)
  a += 0x7654321L;
  else
  b += 0x5fe453L;
  }
}

This code enters infinite recurson.

Configured with: ../../gcc.gnu.org/trunk/configure --target=avr
--prefix=/home/georg/install/gcc-4.7 --disable-nls --enable-languages=c,c++
--with-dwarf2 --enable-checking=yes,rtl


[Bug c/51527] ICE: Segmentation fault: 'convert_to_integer' enters infinite recursion

2011-12-13 Thread gjl at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=51527

--- Comment #1 from Georg-Johann Lay  2011-12-13 
12:30:12 UTC ---
Created attachment 26069
  --> http://gcc.gnu.org/bugzilla/attachment.cgi?id=26069
Log output, FYI


[Bug c/51527] ICE: Segmentation fault: 'convert_to_integer' enters infinite recursion

2011-12-13 Thread gjl at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=51527

Georg-Johann Lay  changed:

   What|Removed |Added

 Status|UNCONFIRMED |NEW
   Last reconfirmed||2011-12-13
 CC||eric.weddington at atmel
   ||dot com
   Target Milestone|--- |4.7.0
 Ever Confirmed|0   |1


[Bug fortran/51520] [4.6 Regression] ICE in gfortran 4.6.2, x86_64

2011-12-13 Thread dominiq at lps dot ens.fr
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=51520

--- Comment #3 from Dominique d'Humieres  2011-12-13 
12:49:31 UTC ---
> At least I hope for some smaller patch than the big constructor patch (Rev.
> 181425).

Sadly enough, this pr has been fixed by r181425 (r181424 gives the ICE).


[Bug tree-optimization/51519] [4.7 Regression] ICE: in inline_small_functions, at ipa-inline.c:1410 with -O -fno-guess-branch-probability -findirect-inlining

2011-12-13 Thread rguenth at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=51519

--- Comment #2 from Richard Guenther  2011-12-13 
12:55:00 UTC ---
Author: rguenth
Date: Tue Dec 13 12:54:57 2011
New Revision: 182279

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=182279
Log:
2011-12-13  Richard Guenther  

PR tree-optimization/51519
* ipa-inline.c (edge_badness): Use edge growth in non-guessed
branch probability case as well.

* gcc.dg/pr51519.c: New testcase.

Added:
trunk/gcc/testsuite/gcc.dg/pr51519.c
Modified:
trunk/gcc/ChangeLog
trunk/gcc/ipa-inline.c
trunk/gcc/testsuite/ChangeLog


[Bug tree-optimization/51481] [4.7 Regression] ice: dead STMT in EH table

2011-12-13 Thread rguenth at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=51481

--- Comment #9 from Richard Guenther  2011-12-13 
12:56:13 UTC ---
Author: rguenth
Date: Tue Dec 13 12:56:09 2011
New Revision: 182280

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=182280
Log:
2011-12-13  Richard Guenther  

PR middle-end/51481
* tree-cfg.c (replace_uses_by): Pass proper arguments to
maybe_clean_or_replace_eh_stmt.

Modified:
trunk/gcc/ChangeLog
trunk/gcc/tree-cfg.c



[Bug tree-optimization/51519] [4.7 Regression] ICE: in inline_small_functions, at ipa-inline.c:1410 with -O -fno-guess-branch-probability -findirect-inlining

2011-12-13 Thread rguenth at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=51519

Richard Guenther  changed:

   What|Removed |Added

 Status|ASSIGNED|RESOLVED
 Resolution||FIXED

--- Comment #3 from Richard Guenther  2011-12-13 
13:26:54 UTC ---
Fixed.


[Bug tree-optimization/51362] [4.7 Regression] ICE: SIGFPE (division by zero) in good_cloning_opportunity_p at ipa-cp.c:2401

2011-12-13 Thread jamborm at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=51362

Martin Jambor  changed:

   What|Removed |Added

URL||http://gcc.gnu.org/ml/gcc-p
   ||atches/2011-12/msg00987.htm
   ||l

--- Comment #5 from Martin Jambor  2011-12-13 
13:39:36 UTC ---
Patch posted to mailing list:

http://gcc.gnu.org/ml/gcc-patches/2011-12/msg00987.html


[Bug tree-optimization/51117] [4.7 regression] rev.181172 causes glibc build failure

2011-12-13 Thread matz at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=51117

--- Comment #9 from Michael Matz  2011-12-13 13:59:42 
UTC ---
Author: matz
Date: Tue Dec 13 13:59:35 2011
New Revision: 182283

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=182283
Log:
PR tree-optimization/51117
* tree-eh.c (sink_clobbers): New function.
(execute_lower_eh_dispatch): Call it for BBs ending with
internally throwing RESX.
* cfgexpand.c (add_scope_conflicts_1): Add all conflicts only
at the first real instruction.

Modified:
trunk/gcc/ChangeLog
trunk/gcc/cfgexpand.c
trunk/gcc/tree-eh.c


[Bug tree-optimization/51481] [4.7 Regression] ice: dead STMT in EH table

2011-12-13 Thread jakub at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=51481

--- Comment #10 from Jakub Jelinek  2011-12-13 
14:01:04 UTC ---
Author: jakub
Date: Tue Dec 13 14:00:58 2011
New Revision: 182284

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=182284
Log:
Revert
2011-12-12  Jakub Jelinek  

PR tree-optimization/51481
* gimple-fold.c (gimple_fold_call): Call
maybe_clean_or_replace_eh_stmt.  Avoid optimization if stmt has EH
edges, but gimple_fold_builtin result can't throw.

Modified:
trunk/gcc/ChangeLog
trunk/gcc/gimple-fold.c


[Bug testsuite/51524] [BMI2] New regression on 182266 vs 182257

2011-12-13 Thread ubizjak at gmail dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=51524

Uros Bizjak  changed:

   What|Removed |Added

 Status|UNCONFIRMED |NEW
   Last reconfirmed||2011-12-13
  Component|target  |testsuite
 Ever Confirmed|0   |1

--- Comment #1 from Uros Bizjak  2011-12-13 14:02:33 
UTC ---
Actually, not a bug but problem with the testcase.

Previously, %edx was allocated for temporary, resulting in:

gen_mulx:
.LFB30:
.cfi_startproc
#(insn:TI 20 4 23 2 (set (reg/v:SI 1 dx [orig:64 b ] [64])
#(mem/c/i:SI (plus:SI (reg/f:SI 7 sp)
#(const_int 8 [0x8])) [2 b+0 S4 A32])) bmi2-mulx32-1.c:24 64
{*movsi_internal}
# (expr_list:REG_EQUIV (mem/c/i:SI (plus:SI (reg/f:SI 7 sp)
#(const_int 8 [0x8])) [2 b+0 S4 A32])
#(nil)))
movl8(%esp), %edx# 20*movsi_internal/1[length = 4]
#(insn:TI 23 20 17 2 (parallel [
#(set (reg:SI 0 ax [65])
#(mult:SI (reg/v:SI 1 dx [orig:64 b ] [64])
#(mem/c/i:SI (plus:SI (reg/f:SI 7 sp)
#(const_int 4 [0x4])) [2 a+0 S4 A32])))
#(set (reg:SI 1 dx [+4 ])
#(truncate:SI (lshiftrt:DI (mult:DI (zero_extend:DI (reg/v:SI 1
dx [orig:64 b ] [64]))
#(zero_extend:DI (mem/c/i:SI (plus:SI (reg/f:SI 7
sp)
#(const_int 4 [0x4])) [2 a+0 S4 A32])))
#(const_int 32 [0x20]
#]) bmi2-mulx32-1.c:24 337 {*bmi2_umulsidi3_1}
# (nil))
mulx4(%esp), %eax, %edx# 23*bmi2_umulsidi3_1[length = 7]

But now, %eax gets allocated as temporary, resulting in:

gen_mulx:
.LFB30:
.cfi_startproc
#(insn:TI 20 4 9 2 (set (reg/v:SI 0 ax [orig:64 b ] [64])
#(mem/c/i:SI (plus:SI (reg/f:SI 7 sp)
#(const_int 8 [0x8])) [2 b+0 S4 A32])) bmi2-mulx32-1.c:24 64
{*movsi_internal}
# (expr_list:REG_EQUIV (mem/c/i:SI (plus:SI (reg/f:SI 7 sp)
#(const_int 8 [0x8])) [2 b+0 S4 A32])
#(nil)))
movl8(%esp), %eax# 20*movsi_internal/1[length = 4]
#(insn:TI 9 20 17 2 (parallel [
#(set (reg:DI 0 ax [65])
#(mult:DI (zero_extend:DI (reg/v:SI 0 ax [orig:64 b ] [64]))
#(zero_extend:DI (mem/c/i:SI (plus:SI (reg/f:SI 7 sp)
#(const_int 4 [0x4])) [2 a+0 S4 A32]
#(clobber (reg:CC 17 flags))
#]) bmi2-mulx32-1.c:24 338 {*umulsidi3_1}
# (expr_list:REG_UNUSED (reg:CC 17 flags)
#(nil)))
mull4(%esp)# 9*umulsidi3_1/1[length = 4]

(The latter version is IMO even better in this case).

A testcase should be fixed to force bmi2 alternative in:

(define_insn "*umul3_1"
  [(set (match_operand: 0 "register_operand" "=A,r")
(mult:
  (zero_extend:
(match_operand:DWIH 1 "nonimmediate_operand" "%0,d"))
  (zero_extend:
(match_operand:DWIH 2 "nonimmediate_operand" "rm,rm"
   (clobber (reg:CC FLAGS_REG))]
  "!(MEM_P (operands[1]) && MEM_P (operands[2]))"
  "@
   mul{}\t%2
   #"
  [(set_attr "isa" "*,bmi2")
   ...


[Bug middle-end/51521] [4.7 Regression]: build fails on cris-elf building libstdc++-v3: verify_flow_info failed

2011-12-13 Thread rguenth at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=51521

Richard Guenther  changed:

   What|Removed |Added

 Status|UNCONFIRMED |NEW
   Last reconfirmed||2011-12-13
   Target Milestone|--- |4.7.0
 Ever Confirmed|0   |1

--- Comment #4 from Richard Guenther  2011-12-13 
14:05:45 UTC ---
(In reply to comment #3)
> Hi Richard,
> 
> May you please take a look at this message where I describe why I had done the
> change:
> http://codereview.appspot.com/5486043/#msg6
> 
> The edge w/o EDGE_FALLTHRU also causes internal errors when I try to split it.
> 
> > The EDGE_FALLTHRU flag is wrong if any of EDGE_TRUE/FALSE_* is added which
> is probably what happens.  Thus the patch was wrong.
> 
> But when I set EDGE_FALLTHRU there is no EDGE_TRUE/FALSE_* yet (the flags were
> 0). So, isn't it who adds EDGE_TRUE/FALSE_* must reset EDGE_FALLTHRU?

See at the single user of the function you changed.  It continues to
add BBs and edges.

Please debug the new testsuite failures (which you should have seen during
your testing) and see why your flag setting is incorrect.


[Bug tree-optimization/51117] [4.7 regression] rev.181172 causes glibc build failure

2011-12-13 Thread jakub at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=51117

Jakub Jelinek  changed:

   What|Removed |Added

 Status|ASSIGNED|RESOLVED
 Resolution||FIXED

--- Comment #10 from Jakub Jelinek  2011-12-13 
14:04:52 UTC ---
Fixed.


[Bug middle-end/51521] [4.7 Regression]: build fails on cris-elf building libstdc++-v3: verify_flow_info failed

2011-12-13 Thread rguenth at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=51521

--- Comment #5 from Richard Guenther  2011-12-13 
14:07:49 UTC ---
(In reply to comment #4)
> (In reply to comment #3)
> > Hi Richard,
> > 
> > May you please take a look at this message where I describe why I had done 
> > the
> > change:
> > http://codereview.appspot.com/5486043/#msg6
> > 
> > The edge w/o EDGE_FALLTHRU also causes internal errors when I try to split 
> > it.
> > 
> > > The EDGE_FALLTHRU flag is wrong if any of EDGE_TRUE/FALSE_* is added which
> > is probably what happens.  Thus the patch was wrong.
> > 
> > But when I set EDGE_FALLTHRU there is no EDGE_TRUE/FALSE_* yet (the flags 
> > were
> > 0). So, isn't it who adds EDGE_TRUE/FALSE_* must reset EDGE_FALLTHRU?
> 
> See at the single user of the function you changed.  It continues to
> add BBs and edges.
> 
> Please debug the new testsuite failures (which you should have seen during
> your testing) and see why your flag setting is incorrect.

'I've done full 3 stage build for all front-ends, then 'make bootstrap', then
diff output of 'make check-gcc -j16 RUNTESTFLAGS="dg.exp"''

That is wrong.  You should do 'make check-gcc -j16', without restricting
the set of testcases run to dg.exp.

Please revert your patch and do proper testing.


[Bug middle-end/51521] [4.7 Regression]: build fails on cris-elf building libstdc++-v3: verify_flow_info failed

2011-12-13 Thread rguenth at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=51521

--- Comment #6 from Richard Guenther  2011-12-13 
14:12:57 UTC ---
(In reply to comment #5)
> (In reply to comment #4)
> > (In reply to comment #3)
> > > Hi Richard,
> > > 
> > > May you please take a look at this message where I describe why I had 
> > > done the
> > > change:
> > > http://codereview.appspot.com/5486043/#msg6
> > > 
> > > The edge w/o EDGE_FALLTHRU also causes internal errors when I try to 
> > > split it.
> > > 
> > > > The EDGE_FALLTHRU flag is wrong if any of EDGE_TRUE/FALSE_* is added 
> > > > which
> > > is probably what happens.  Thus the patch was wrong.
> > > 
> > > But when I set EDGE_FALLTHRU there is no EDGE_TRUE/FALSE_* yet (the flags 
> > > were
> > > 0). So, isn't it who adds EDGE_TRUE/FALSE_* must reset EDGE_FALLTHRU?
> > 
> > See at the single user of the function you changed.  It continues to
> > add BBs and edges.
> > 
> > Please debug the new testsuite failures (which you should have seen during
> > your testing) and see why your flag setting is incorrect.
> 
> 'I've done full 3 stage build for all front-ends, then 'make bootstrap', then
> diff output of 'make check-gcc -j16 RUNTESTFLAGS="dg.exp"''
> 
> That is wrong.  You should do 'make check-gcc -j16', without restricting
> the set of testcases run to dg.exp.

Err, and to C.  The proper way is

make -k check -j16


[Bug testsuite/51524] [BMI2] New regression on 182266 vs 182257

2011-12-13 Thread ubizjak at gmail dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=51524

--- Comment #2 from Uros Bizjak  2011-12-13 14:21:37 
UTC ---
Index: gcc.target/i386/bmi2-mulx32-1.c
===
--- gcc.target/i386/bmi2-mulx32-1.c (revision 182271)
+++ gcc.target/i386/bmi2-mulx32-1.c (working copy)
@@ -15,7 +15,7 @@
   return res;
 }

-__attribute__((noinline))
+__attribute__((noinline, regparm (2)))
 unsigned long long
 gen_mulx (unsigned a, unsigned b)
 {
Index: gcc.target/i386/bmi2-mulx32-2.c
===
--- gcc.target/i386/bmi2-mulx32-2.c (revision 182271)
+++ gcc.target/i386/bmi2-mulx32-2.c (working copy)
@@ -17,7 +17,7 @@
   return res;
 }

-__attribute__((noinline))
+__attribute__((noinline, regparm (2)))
 unsigned calc_mulx_u32 (unsigned x, unsigned y, unsigned *res_h)
 {
   return (unsigned) _mulx_u32 (x, y, res_h);


[Bug debug/48354] internal compiler error: in splice_child_die, at dwarf2out.c:8064

2011-12-13 Thread rguenth at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=48354

Richard Guenther  changed:

   What|Removed |Added

 Status|ASSIGNED|RESOLVED
 Resolution||FIXED

--- Comment #20 from Richard Guenther  2011-12-13 
14:44:43 UTC ---
Fixed.


[Bug debug/48354] internal compiler error: in splice_child_die, at dwarf2out.c:8064

2011-12-13 Thread rguenth at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=48354

--- Comment #19 from Richard Guenther  2011-12-13 
14:43:50 UTC ---
Author: rguenth
Date: Tue Dec 13 14:43:44 2011
New Revision: 182286

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=182286
Log:
2011-12-13  Richard Guenther  

PR lto/48354
* tree.c (find_decls_types_r): Also walk DECL_ORIGINAL_TYPE.
* tree-streamer-in.c (lto_input_ts_decl_non_common_tree_pointers):
Stream DECL_ORIGINAL_TYPE.
* tree-streamer-out.c (write_ts_decl_non_common_tree_pointers):
Likewise.

lto/
* lto.c (lto_ft_decl_non_common): When we merged DECL_ORIGINAL_TYPE
with the type of the TYPE_DECL clear DECL_ORIGINAL_TYPE.

* g++.dg/lto/pr48354-1_0.C: New testcase.

Added:
trunk/gcc/testsuite/g++.dg/lto/pr48354-1_0.C
Modified:
trunk/gcc/ChangeLog
trunk/gcc/lto/ChangeLog
trunk/gcc/lto/lto.c
trunk/gcc/testsuite/ChangeLog
trunk/gcc/tree-streamer-in.c
trunk/gcc/tree-streamer-out.c
trunk/gcc/tree.c


[Bug c++/51477] [c++0x] ICE with initialization of invalid non-static data member

2011-12-13 Thread dodji at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=51477

Dodji Seketeli  changed:

   What|Removed |Added

 Status|UNCONFIRMED |ASSIGNED
   Last reconfirmed||2011-12-13
 CC||dodji at gcc dot gnu.org
 AssignedTo|unassigned at gcc dot   |dodji at gcc dot gnu.org
   |gnu.org |
 Ever Confirmed|0   |1


[Bug tree-optimization/51491] ccp when converting from alloca should add a CLOBBER to right before __builtin_stack_restore

2011-12-13 Thread vries at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=51491

--- Comment #7 from vries at gcc dot gnu.org 2011-12-13 15:00:35 UTC ---
Created attachment 26070
  --> http://gcc.gnu.org/bugzilla/attachment.cgi?id=26070
update tentative patch

now testing on x86_64


[Bug testsuite/51524] [BMI2] New regression on 182266 vs 182257

2011-12-13 Thread uros at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=51524

--- Comment #3 from uros at gcc dot gnu.org 2011-12-13 15:00:19 UTC ---
Author: uros
Date: Tue Dec 13 15:00:09 2011
New Revision: 182287

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=182287
Log:
PR testsuite/51524
* gcc.target/i386/bmi2-mulx32-1.c (gen_mulx): Add attribute regparm(2).
* gcc.target/i386/bmi2-mulx32-2.c (calc_mulx_u32): Ditto.


Modified:
trunk/gcc/testsuite/ChangeLog
trunk/gcc/testsuite/gcc.target/i386/bmi2-mulx32-1.c
trunk/gcc/testsuite/gcc.target/i386/bmi2-mulx32-2.c


[Bug testsuite/51524] [BMI2] New regression on 182266 vs 182257

2011-12-13 Thread ubizjak at gmail dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=51524

Uros Bizjak  changed:

   What|Removed |Added

 Target||x86
 Status|NEW |RESOLVED
 Resolution||FIXED
   Target Milestone|--- |4.7.0

--- Comment #4 from Uros Bizjak  2011-12-13 15:06:22 
UTC ---
Fixed.


[Bug tree-optimization/51528] New: SRA should not create BOOLEAN_TYPE replacements

2011-12-13 Thread jamborm at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=51528

 Bug #: 51528
   Summary: SRA should not create BOOLEAN_TYPE replacements
Classification: Unclassified
   Product: gcc
   Version: 4.7.0
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: tree-optimization
AssignedTo: jamb...@gcc.gnu.org
ReportedBy: jamb...@gcc.gnu.org


We already do not create ENUMERAL_TYPE replacements in SRA and neither
we should be creating BOOLEAN_TYPE ones because that can lead to
miscompilations, as the attached testcase shows.  Like in the enumeral
case, we should only create replacements of types with precision that
matches their mode size.

I'll take care of that.


[Bug tree-optimization/51528] SRA should not create BOOLEAN_TYPE replacements

2011-12-13 Thread jamborm at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=51528

--- Comment #1 from Martin Jambor  2011-12-13 
15:26:14 UTC ---
Created attachment 26071
  --> http://gcc.gnu.org/bugzilla/attachment.cgi?id=26071
Testcase

This is the aforementioned test case.


[Bug tree-optimization/51528] SRA should not create BOOLEAN_TYPE replacements

2011-12-13 Thread jamborm at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=51528

Martin Jambor  changed:

   What|Removed |Added

 Status|UNCONFIRMED |ASSIGNED
   Last reconfirmed||2011-12-13
 Ever Confirmed|0   |1


[Bug middle-end/51443] [trans-mem] internal compiler error in expand_block_tm of trans-mem.c

2011-12-13 Thread aldyh at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=51443

--- Comment #2 from Aldy Hernandez  2011-12-13 
15:38:54 UTC ---
Proposed fix,

http://gcc.gnu.org/ml/gcc-patches/2011-12/msg00995.html


[Bug tree-optimization/51362] [4.7 Regression] ICE: SIGFPE (division by zero) in good_cloning_opportunity_p at ipa-cp.c:2401

2011-12-13 Thread jamborm at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=51362

--- Comment #6 from Martin Jambor  2011-12-13 
15:43:39 UTC ---
Author: jamborm
Date: Tue Dec 13 15:43:36 2011
New Revision: 182288

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=182288
Log:
2011-12-13  Martin Jambor  

PR tree-optimization/51362
* ipa-cp.c (estimate_local_effects): When estimated size of a
specialized clone is zero, bump it to one.

* testsuite/gcc.dg/ipa/pr51362.c: New test.


Added:
trunk/gcc/testsuite/gcc.dg/ipa/pr51362.c
Modified:
trunk/gcc/ChangeLog
trunk/gcc/ipa-cp.c
trunk/gcc/testsuite/ChangeLog


[Bug bootstrap/51503] [4.7 Regression] Failure to build (non-bootstrap) gcc libitm if only building C

2011-12-13 Thread rguenth at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=51503

--- Comment #3 from Richard Guenther  2011-12-13 
15:45:45 UTC ---
No, that doesn't seem to cause the C++ frontend to be enabled, instead we
do such magic via config-lang.in fragments - no such thing exists for
target libraries (yet).  See the toplevel configure.


[Bug c++/51476] [c++0x] [4.7 Regression] ICE with invalid pointer-to-member template parameter

2011-12-13 Thread dodji at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=51476

--- Comment #2 from Dodji Seketeli  2011-12-13 
15:51:52 UTC ---
A candidate patch was posted to
http://gcc.gnu.org/ml/gcc-patches/2011-12/msg00996.html


[Bug tree-optimization/51362] [4.7 Regression] ICE: SIGFPE (division by zero) in good_cloning_opportunity_p at ipa-cp.c:2401

2011-12-13 Thread jamborm at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=51362

Martin Jambor  changed:

   What|Removed |Added

 Status|ASSIGNED|RESOLVED
 Resolution||FIXED

--- Comment #7 from Martin Jambor  2011-12-13 
15:55:50 UTC ---
Fixed.


[Bug middle-end/51439] [4.7 Regression] ICE(SIGFPE) in good_cloning_opportunity_p

2011-12-13 Thread jamborm at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=51439

--- Comment #5 from Martin Jambor  2011-12-13 
15:58:17 UTC ---
Indeed it is and I have just verified that it is also fixed.


[Bug middle-end/50628] [4.7 Regression] gfortran.fortran-torture/execute/entry_4.f90 fails

2011-12-13 Thread jamborm at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=50628

--- Comment #14 from Martin Jambor  2011-12-13 
16:08:19 UTC ---
Author: jamborm
Date: Tue Dec 13 16:08:14 2011
New Revision: 182289

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=182289
Log:
2011-12-13  Martin Jambor  

PR middle-end/50628
* tree-sra.c (propagate_subaccesses_across_link): Do not propagate
sub-accesses of scalar accesses.


Modified:
trunk/gcc/ChangeLog
trunk/gcc/tree-sra.c


[Bug middle-end/50628] [4.7 Regression] gfortran.fortran-torture/execute/entry_4.f90 fails

2011-12-13 Thread jamborm at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=50628

Martin Jambor  changed:

   What|Removed |Added

 Status|ASSIGNED|RESOLVED
URL||http://gcc.gnu.org/ml/gcc-p
   ||atches/2011-12/msg01000.htm
   ||l
 Resolution||FIXED

--- Comment #15 from Martin Jambor  2011-12-13 
16:16:28 UTC ---
This is now fixed with the patch from comment #12.
However, this PR helped to uncover a more fundamental bug which is now
PR 51528.  

For reference, the message in the mailing list is:
http://gcc.gnu.org/ml/gcc-patches/2011-12/msg01000.html


[Bug tree-optimization/51499] vectorizer missing simple case

2011-12-13 Thread irar at il dot ibm.com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=51499

--- Comment #14 from Ira Rosen  2011-12-13 16:27:19 UTC 
---
(In reply to comment #13)
> 
> However, I don't fully understand Richard Guenther's example. Yes his
> example requires -fassociative-math to be vectorized, however, my example
> would translate to something like
> 
>   sum1 += a[i];
>   sum2 += a[i+1];
> 
> and now it doesn't matter if it's executed this way or the other way
> around
> 
>   sum2 += a[i+1];
>   sum1 += a[i];

The problem is probably more in implementation. The change of order will also
change between sum1 and sum2, so when you want to return sum1+sum2, the
vectorized version will return sum2+sum1.


[Bug fortran/51529] New: gfortran.dg/class_to_type_1.f03 is miscompiled: Uninitialized variable used

2011-12-13 Thread burnus at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=51529

 Bug #: 51529
   Summary: gfortran.dg/class_to_type_1.f03 is miscompiled:
Uninitialized variable used
Classification: Unclassified
   Product: gcc
   Version: 4.7.0
Status: UNCONFIRMED
  Keywords: wrong-code
  Severity: normal
  Priority: P3
 Component: fortran
AssignedTo: unassig...@gcc.gnu.org
ReportedBy: bur...@gcc.gnu.org
CC: pa...@gcc.gnu.org


$ gfortran -g gfortran.dg/class_to_type_1.f03
$ MALLOC_PERTURB_= ./a.out
$ MALLOC_PERTURB_=33 ./a.out

A fatal error occurred! Backtrace for this error:
...
#6  0x400929 in __copy_MAIN___T2 at class_to_type_1.f03:5
#7  0x4013D1 in MAIN__ at class_to_type_1.f03:17


That's a typical sign for code which requires that "malloc" returns '\0'-set
memory, i.e. gfortran generates code which uses an uninitialized variable.


[Bug c++/51530] New: internal compiler error: in unify, at cp/pt.c:16854

2011-12-13 Thread dave at boostpro dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=51530

 Bug #: 51530
   Summary: internal compiler error: in unify, at cp/pt.c:16854
Classification: Unclassified
   Product: gcc
   Version: 4.7.0
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: c++
AssignedTo: unassig...@gcc.gnu.org
ReportedBy: d...@boostpro.com


Please compile the enclosed with -std=c++11


[Bug c++/51530] internal compiler error: in unify, at cp/pt.c:16854

2011-12-13 Thread dave at boostpro dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=51530

--- Comment #1 from Dave Abrahams  2011-12-13 
17:46:22 UTC ---
Created attachment 26072
  --> http://gcc.gnu.org/bugzilla/attachment.cgi?id=26072
reproducer


[Bug middle-end/51443] [trans-mem] internal compiler error in expand_block_tm of trans-mem.c

2011-12-13 Thread aldyh at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=51443

Aldy Hernandez  changed:

   What|Removed |Added

 Status|NEW |RESOLVED
 Resolution||FIXED

--- Comment #3 from Aldy Hernandez  2011-12-13 
17:52:50 UTC ---
committed


[Bug fortran/51529] [OOP] gfortran.dg/class_to_type_1.f03 is miscompiled: Uninitialized variable used

2011-12-13 Thread pault at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=51529

--- Comment #1 from Paul Thomas  2011-12-13 18:14:49 
UTC ---
(In reply to comment #0)
> $ gfortran -g gfortran.dg/class_to_type_1.f03
> $ MALLOC_PERTURB_= ./a.out
> $ MALLOC_PERTURB_=33 ./a.out
> 
> A fatal error occurred! Backtrace for this error:
> ...
> #6  0x400929 in __copy_MAIN___T2 at class_to_type_1.f03:5
> #7  0x4013D1 in MAIN__ at class_to_type_1.f03:17
> 
> 
> That's a typical sign for code which requires that "malloc" returns '\0'-set
> memory, i.e. gfortran generates code which uses an uninitialized variable.

I cannot reproduce this on x86_64/FC9.  Nor can I see anything obvious in the
code on the other hand, there is a lot of it!

I'll try on my Debian equipped laptop tomorrow.

Paul


[Bug c++/14258] typename in a using declaration not supported

2011-12-13 Thread fabien at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=14258

--- Comment #15 from fabien at gcc dot gnu.org 2011-12-13 18:47:04 UTC ---
Author: fabien
Date: Tue Dec 13 18:46:58 2011
New Revision: 182292

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

2011-12-11  Fabien Chene  

PR c++/14258
* g++.dg/template/using16.C: New.
* g++.dg/template/using17.C: New.

gcc/cp/ChangeLog

2011-12-11  Fabien Chene  

PR c++/14258
* cp-tree.h (USING_DECL_TYPENAME_P): New macro.
* parser.c (cp_parser_nonclass_name): Handle using declarations
that refer to a dependent type.
(cp_parser_using_declaration): Set USING_DECL_TYPENAME_P to 1 if
the using declaration refers to a dependent type.

Added:
trunk/gcc/testsuite/g++.dg/template/using16.C
trunk/gcc/testsuite/g++.dg/template/using17.C
Modified:
trunk/gcc/cp/ChangeLog
trunk/gcc/cp/cp-tree.h
trunk/gcc/cp/parser.c
trunk/gcc/testsuite/ChangeLog


[Bug rtl-optimization/47612] RTL crash when cc0 setter moved away from cc0 user

2011-12-13 Thread joel at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=47612

--- Comment #19 from Joel Sherrill  2011-12-13 
19:10:10 UTC ---
Time to close this?


[Bug c++/51531] New: bool conversion to pointer should warn

2011-12-13 Thread tutufan at gmail dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=51531

 Bug #: 51531
   Summary: bool conversion to pointer should warn
Classification: Unclassified
   Product: gcc
   Version: 4.6.2
Status: UNCONFIRMED
  Severity: minor
  Priority: P3
 Component: c++
AssignedTo: unassig...@gcc.gnu.org
ReportedBy: tutu...@gmail.com


/* clang 3.1 (trunk 145840) warns

bool-convert.cpp:12:14: warning: initialization of pointer of type 'int *' to
null from a constant boolean
  expression [-Wbool-conversions]
int *p = false;
 ^

*/


int
main() {

int *p = false;

return !!p;
}


[Bug c++/51532] New: Invalid Code Generated for cpu32.

2011-12-13 Thread joel at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=51532

 Bug #: 51532
   Summary: Invalid Code Generated for cpu32.
Classification: Unclassified
   Product: gcc
   Version: 4.7.0
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: c++
AssignedTo: unassig...@gcc.gnu.org
ReportedBy: j...@gcc.gnu.org


/home2/joel/build/b-m68k-gcc/./gcc/xgcc -shared-libgcc
-B/home2/joel/build/b-m68k-gcc/./gcc -nostdinc++
-L/home2/joel/build/b-m68k-gcc/m68k-rtems4.11/mcpu32/libstdc++-v3/src
-L/home2/joel/build/b-m68k-gcc/m68k-rtems4.11/mcpu32/libstdc++-v3/src/.libs
-nostdinc -B/home2/joel/build/b-m68k-gcc/m68k-rtems4.11/mcpu32/newlib/ -isystem
/home2/joel/build/b-m68k-gcc/m68k-rtems4.11/mcpu32/newlib/targ-include -isystem
/users/joel/test-gcc/gcc-svn/newlib/libc/include
-B/users/joel/test-gcc/install-svn/m68k-rtems4.11/bin/
-B/users/joel/test-gcc/install-svn/m68k-rtems4.11/lib/ -isystem
/users/joel/test-gcc/install-svn/m68k-rtems4.11/include -isystem
/users/joel/test-gcc/install-svn/m68k-rtems4.11/sys-include -mcpu=cpu32
-I/users/joel/test-gcc/gcc-svn/libstdc++-v3/../libgcc
-I/home2/joel/build/b-m68k-gcc/m68k-rtems4.11/mcpu32/libstdc++-v3/include/m68k-rtems4.11
-I/home2/joel/build/b-m68k-gcc/m68k-rtems4.11/mcpu32/libstdc++-v3/include
-I/users/joel/test-gcc/gcc-svn/libstdc++-v3/libsupc++ -fno-implicit-templates
-Wall -Wextra -Wwrite-strings -Wcast-qual -fdiagnostics-show-location=once
-ffunction-sections -fdata-sections -frandom-seed=eh_tm.lo -g -O2 -mcpu=cpu32
-c /users/joel/test-gcc/gcc-svn/libstdc++-v3/libsupc++/eh_tm.cc -o eh_tm.o
/tmp/ccWdMzkS.s: Assembler messages:
/tmp/ccWdMzkS.s:63: Error: invalid instruction for this architecture; needs
68020 or higher (68020 [68k, 68ec020], 68030 [68ec030], 68040 [68ec040], 68060
[68ec060]) -- statement `cas.l %d0,%d1,-68(%a2)' ignored
/tmp/ccWdMzkS.s:190: Error: invalid instruction for this architecture; needs
68020 or higher (68020 [68k, 68ec020], 68030 [68ec030], 68040 [68ec040], 68060
[68ec060]) -- statement `cas.l %d0,%d1,-68(%a0)' ignored
/tmp/ccWdMzkS.s:296: Error: invalid instruction for this architecture; needs
68020 or higher (68020 [68k, 68ec020], 68030 [68ec030], 68040 [68ec040], 68060
[68ec060]) -- statement `cas.l %d0,%d1,-68(%a0)' ignored
/tmp/ccWdMzkS.s:785: Error: invalid instruction for this architecture; needs
68020 or higher (68020 [68k, 68ec020], 68030 [68ec030], 68040 [68ec040], 68060
[68ec060]) -- statement `cas.l %d1,%d0,-68(%a2)' ignored


[Bug c++/51533] New: initialization with uninitialized member should warn

2011-12-13 Thread tutufan at gmail dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=51533

 Bug #: 51533
   Summary: initialization with uninitialized member should warn
Classification: Unclassified
   Product: gcc
   Version: 4.6.2
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: c++
AssignedTo: unassig...@gcc.gnu.org
ReportedBy: tutu...@gmail.com


/* clang 3.1 (trunk 145840) warns

class-init-bug.cpp:4:13: warning: field is uninitialized when used here
[-Wuninitialized]
a() : c(c) { }

*/


class a {
a() : c(c) { }

int c;
};

int
main() {
return 0;
}


[Bug c++/51532] Invalid Code Generated for cpu32.

2011-12-13 Thread joel at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=51532

Joel Sherrill  changed:

   What|Removed |Added

  Known to work||4.6.1

--- Comment #1 from Joel Sherrill  2011-12-13 19:23:43 
UTC ---
xgcc (GCC) 4.7.0 20111207 (experimental) [trunk revision 182083]

m68k-rtems last completely compiled with this version:

m68k-rtems4.11-g++ (GCC) 4.7.0 2004 (experimental) [trunk revision 180959]

This is a regression in the past month on the head.


[Bug c++/51532] Invalid Code Generated for cpu32.

2011-12-13 Thread joel at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=51532

--- Comment #2 from Joel Sherrill  2011-12-13 19:24:37 
UTC ---
Created attachment 26073
  --> http://gcc.gnu.org/bugzilla/attachment.cgi?id=26073
Test case


[Bug target/51534] New: Bad code gen for vcgtq_u32 NEON intrinsic

2011-12-13 Thread rmansfield at qnx dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=51534

 Bug #: 51534
   Summary: Bad code gen for vcgtq_u32 NEON intrinsic
Classification: Unclassified
   Product: gcc
   Version: 4.7.0
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: target
AssignedTo: unassig...@gcc.gnu.org
ReportedBy: rmansfi...@qnx.com
  Host: i686-unknown-linux-gnu
Target: arm-unknown-linux-gnueabi
 Build: i686-unknown-linux-gnu


$ ./xgcc -v
Using built-in specs.
COLLECT_GCC=./xgcc
Target: arm-unknown-linux-gnueabi
Configured with: ../configure --target=arm-unknown-linux-gnueabi
--prefix=/home/ryan/x-tools/arm-unknown-linux-gnueabi
--with-sysroot=/home/ryan/x-tools/arm-unknown-linux-gnueabi/arm-unknown-linux-gnueabi//sys-root
--disable-multilib
--with-local-prefix=/home/ryan/x-tools/arm-unknown-linux-gnueabi/arm-unknown-linux-gnueabi/sys-root
--disable-nls --enable-threads=posix --enable-symvers=gnu --enable-c99
--enable-long-long --enable-target-optspace
target_alias=arm-unknown-linux-gnueabi --enable-languages=c++ --disable-shared
--disable-libmudflap --disable-libssp
Thread model: posix
gcc version 4.7.0 20111213 (experimental) [trunk revision 182291] (GCC) 

$ cat ~/foo.c
#include 

void foo (unsigned * src, unsigned *dst, int width)
{
  const int32x4_t vec_alpha_shift = vdupq_n_s32 (0);
  const uint32x4_t vec_one = vdupq_n_u32 (1u);
  const uint32x4_t vec_zero = vdupq_n_u32 (0u);

while (width >= 4)
{
  uint32x4_t s0 = vld1q_u32 (src);
  uint32x4_t d0 = vld1q_u32 (dst);
  uint32x4_t vec_alpha = vshlq_u32 (s0, vec_alpha_shift);
  vec_alpha =
vaddq_u32 (vec_alpha,
   vandq_u32 (vcgtq_u32 (vec_alpha, vec_zero), vec_one));
  s0 = vmulq_u32 (s0, vec_alpha);
  d0 = vaddq_u32 (s0, d0);
  vst1q_u32 (dst, d0);
}
}

$ ./xgcc -B. -O3 -ftree-vectorize -mfpu=neon -mfloat-abi=softfp ~/foo.c 
-march=armv7-a -c

Changing the code from:

const uint32x4_t vec_zero = vdupq_n_u32 (0u)

to

const uint32x4_t vec_zero = vdupq_n_u32 (1u)

results in a proper reg load and operand to vcgt. 

 vmov.i32q9, #0  @ v4si
 vld1.32{d16-d17}, [r8]
+vmov.i32q12, #1  @ v4si
 movr0, sl
 vld1.32{d20-d21}, [sl]
 vshl.u32q9, q8, q9
-vcgt.u32q11, q9, #0
+vcgt.u32q11, q9, q12
 vandq11, q11, q4
 vadd.i32q9, q9, q11
 vmul.i32q8, q8, q9

Also happens on the 4.6 branch. Compiles OK with 4.4 branch. I haven't checked
4.5 yet.


[Bug c++/51533] initialization with uninitialized member should warn

2011-12-13 Thread marc.glisse at normalesup dot org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=51533

--- Comment #1 from Marc Glisse  2011-12-13 
19:29:03 UTC ---
-Winit-self ?


[Bug c++/14258] typename in a using declaration not supported

2011-12-13 Thread fabien at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=14258

fabien at gcc dot gnu.org changed:

   What|Removed |Added

 Status|ASSIGNED|RESOLVED
 Resolution||FIXED
  Known to fail||

--- Comment #16 from fabien at gcc dot gnu.org 2011-12-13 19:29:26 UTC ---
Fixed.


[Bug rtl-optimization/51505] [4.5/4.6/4.7 Regression] ICE: in form_sum, at reload.c:5349 with -O --param max-cse-insns=1

2011-12-13 Thread bonzini at gnu dot org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=51505

--- Comment #4 from Paolo Bonzini  2011-12-13 19:34:25 
UTC ---
No, it should be easy.  Just look at the EQ_USES in df_kill_notes and, if one
EQ_USE refers to a dead pseudo, kill the REG_EQUAL or REG_EQUIV note.


[Bug target/49865] [4.7 Regression] Unnecessary reload causes small bloat

2011-12-13 Thread vmakarov at redhat dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=49865

Vladimir Makarov  changed:

   What|Removed |Added

 CC||vmakarov at redhat dot com

--- Comment #5 from Vladimir Makarov  2011-12-13 
19:38:16 UTC ---
I can not reproduce it on the current trunk (rev. 182263).  The recent ira
patches might fix it.  The code generated on the current trunk is 

pushl   %ebp
.cfi_def_cfa_offset 8
.cfi_offset 5, -8
movl%esp, %ebp
.cfi_def_cfa_register 5
pushl   %edi
.cfi_offset 7, -12
movl$1024, %ecx
xorl%eax, %eax
movl8(%ebp), %edi
rep stosl
movl8(%ebp), %eax
movl$0, 4096(%eax)
popl%edi
.cfi_restore 7
popl%ebp
.cfi_restore 5
.cfi_def_cfa 4, 4
ret


[Bug rtl-optimization/47612] RTL crash when cc0 setter moved away from cc0 user

2011-12-13 Thread mikpe at it dot uu.se
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=47612

--- Comment #20 from Mikael Pettersson  2011-12-13 
19:40:19 UTC ---
(In reply to comment #19)
> Time to close this?

Not until the patch gets applied to gcc-4.6 branch.


[Bug target/51534] Bad code gen for vcgtq_u32 NEON intrinsic

2011-12-13 Thread rmansfield at qnx dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=51534

--- Comment #1 from Ryan Mansfield  2011-12-13 
19:47:28 UTC ---
I truncated the actual error emitted by the assembler.

$ ./xgcc -B. -O3 -ftree-vectorize -mfpu=neon -mfloat-abi=softfp ~/foo.c 
-march=armv7-a -c
/tmp/ccCPCd9Z.s: Assembler messages:
/tmp/ccCPCd9Z.s:30: Error: bad type in Neon instruction -- `vcgt.u32 q11,q9,#0'


[Bug c++/51531] bool conversion to pointer should warn

2011-12-13 Thread redi at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=51531

--- Comment #1 from Jonathan Wakely  2011-12-13 
19:53:02 UTC ---
with 4.7

b.cc: In function 'int main()':
b.cc:4:14: warning: converting 'false' to pointer type 'int*'
[-Wconversion-null]


[Bug c++/51533] initialization with uninitialized member should warn

2011-12-13 Thread redi at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=51533

Jonathan Wakely  changed:

   What|Removed |Added

 Status|UNCONFIRMED |RESOLVED
 Resolution||DUPLICATE

--- Comment #2 from Jonathan Wakely  2011-12-13 
19:55:11 UTC ---
I fixed this for 4.7

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


[Bug c++/18016] Warn about member variables initialized with itself

2011-12-13 Thread redi at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=18016

Jonathan Wakely  changed:

   What|Removed |Added

 CC||tutufan at gmail dot com

--- Comment #15 from Jonathan Wakely  2011-12-13 
19:55:11 UTC ---
*** Bug 51533 has been marked as a duplicate of this bug. ***


[Bug c++/51531] bool conversion to pointer should warn

2011-12-13 Thread redi at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=51531

Jonathan Wakely  changed:

   What|Removed |Added

 Status|UNCONFIRMED |RESOLVED
 Resolution||DUPLICATE

--- Comment #2 from Jonathan Wakely  2011-12-13 
19:59:38 UTC ---
and Paolo fixed this one for 4.7

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


[Bug c++/48420] Missed -Wconversion-null warning when passing const bool to T*

2011-12-13 Thread redi at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=48420

Jonathan Wakely  changed:

   What|Removed |Added

 CC||tutufan at gmail dot com

--- Comment #6 from Jonathan Wakely  2011-12-13 
19:59:38 UTC ---
*** Bug 51531 has been marked as a duplicate of this bug. ***


[Bug rtl-optimization/50176] [4.7 Regression] 4.7 generates spill-fill dealing with char->int conversion

2011-12-13 Thread vmakarov at redhat dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=50176

--- Comment #9 from Vladimir Makarov  2011-12-13 
20:04:04 UTC ---
(In reply to comment #0)
> Created attachment 25088 [details]
> 
> 
>  After expanding 4.7 contains:
> 
> (insn 52 51 53 6 (set (reg:QI 83 [ D.2723 ])
> (mem:QI (plus:SI (reg/v/f:SI 75 [ inptr1 ])
> (reg/v:SI 117 [ col ])) [0 MEM[base: inptr1_19, index: col_90,
> offset: 0B]+0 S1 A8])) test_4_6.c:42 -1
>  (nil))
> 
>  and 4.6 contains
> 
> (insn 52 51 53 6 (parallel [
> (set (reg/v:SI 86 [ cb ])
> (zero_extend:SI (mem:QI (plus:SI (reg/v/f:SI 76 [ inptr1 ])
> (reg/v:SI 78 [ col ])) [0 MEM[base: inptr1_19, 
> index: col_22, offset: 0B]+0 S1 A8])))
> (clobber (reg:CC 17 flags))
> ]) test_4_6.c:42 -1
>  (nil))
> 
> 

The reason of different outcome in RA is that p83 generated by 4.7 we can use
only q regs vs. general regs for p86 generated by 4.6.  It decreases # of
possible hard regs for p83 in two times and failure to assign p83 a hard
register.  More accurately IRA assigns dx to p83 then reload spills p83 because
it needs a hard register then reload asks IRA to reassign a hard register to
p83 and IRA fails.


[Bug fortran/48820] TR 29113: Implement parts needed for MPI 3

2011-12-13 Thread w6ws at earthlink dot net
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=48820

Walter Spector  changed:

   What|Removed |Added

 CC||w6ws at earthlink dot net

--- Comment #4 from Walter Spector  2011-12-13 
20:04:48 UTC ---
Added myself to the cc list.  (Interested in the assumed rank and assumed type
portions.)


[Bug c++/51532] Invalid Code Generated for cpu32.

2011-12-13 Thread sch...@linux-m68k.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=51532

--- Comment #3 from Andreas Schwab  2011-12-13 20:47:47 
UTC ---
The use of cas is currently dependent on TARGET_68020, which is true on cpu32,
but there needs to be a TARGET_CAS flag.


[Bug fortran/51535] New: Optimization problem with -finit-real=snan at -O1

2011-12-13 Thread anlauf at gmx dot de
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=51535

 Bug #: 51535
   Summary: Optimization problem with -finit-real=snan at -O1
Classification: Unclassified
   Product: gcc
   Version: 4.7.0
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: fortran
AssignedTo: unassig...@gcc.gnu.org
ReportedBy: anl...@gmx.de


Hi,

with gfortran 4.7.0 svn rev. 181390 on i686-pc-linux-gnu
I have the following problem:

module mo_usstd
  implicit none
contains
  function p_h_usstd (h) result (p)
real, intent(in) :: h
real :: p
real :: sigma, delta
print *, "In p_h_usstd!"
call atmosphere (h, sigma, delta)
p = sigma/delta
  end function p_h_usstd
  subroutine atmosphere (h, sigma, delta)
real,intent(in) :: h
real,intent(out):: sigma
real,intent(out):: delta
delta = h
sigma = h
  end subroutine atmosphere
end module mo_usstd

program gfcbug116
  use mo_usstd
  implicit none
  real :: p, h
  h = 5500
  p = p_h_usstd (h)
  print *, p
end program gfcbug116


Compilation:

% /opt/gcc/4.7/bin/gfortran -O1 -march=native -g -fbacktrace
-ffpe-trap=zero,overflow,invalid -finit-real=snan -static-libgfortran
gfcbug116.f90

Running the program, I get an SIGFPE with a backtrace:

Backtrace for this error:
#0  0x8058B3F in _gfortrani_show_backtrace at backtrace.c:261
#1  0x80495AF in _gfortrani_backtrace_handler at compile_options.c:93
#2  0xE3FF
#3  0x80493C4 in __mo_usstd_MOD_p_h_usstd at gfcbug116.f90:7
#4  0x8049479 in gfcbug116 at gfcbug116.f90:27

Does not make any sense to me.

No problem with -O0, -O2, -O3, -Ofast,-Os
No problem with -finit-real=nan
No problem with 4.6.0

Any ideas what might be going wrong?


[Bug debug/51536] New: ICE on mips64 with -march=octeon -O2 -g -fno-omit-frame-pointer

2011-12-13 Thread pinskia at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=51536

 Bug #: 51536
   Summary: ICE on mips64 with -march=octeon -O2 -g
-fno-omit-frame-pointer
Classification: Unclassified
   Product: gcc
   Version: 4.7.0
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: debug
AssignedTo: unassig...@gcc.gnu.org
ReportedBy: pins...@gcc.gnu.org


t.c: In function 'can_migrate_task':
t.c:11:1: internal compiler error: in maybe_record_trace_start, at
dwarf2cfi.c:2244
Please submit a full bug report,
with preprocessed source if appropriate.
See  for instructions.
--- CUT ---
int can_migrate_task(int *p, int *sd)
{
 int tsk_cache_hot;
 if (p[1] == 5)
   tsk_cache_hot = 1;
 else
   tsk_cache_hot = p[0] < 50ULL;
 if (!tsk_cache_hot || *sd > 1)
  return 1;
 return 0;
}
--- CUT ---
Branch delay slot is putting:
   (insn/f 52 10 11 (set (reg/f:DI 30 $fp)
(reg/f:DI 29 $sp)) 276 {*movdi_64bit}
 (nil))

Which causes the ICE.  This is related to PR 51471 but slightly different.


[Bug debug/51536] [4.7 Regression] ICE on mips64 with -march=octeon -O2 -g -fno-omit-frame-pointer

2011-12-13 Thread pinskia at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=51536

Andrew Pinski  changed:

   What|Removed |Added

 Target||mips64-*-linux-gnu
   Target Milestone|--- |4.7.0
Summary|ICE on mips64 with  |[4.7 Regression] ICE on
   |-march=octeon -O2 -g|mips64 with -march=octeon
   |-fno-omit-frame-pointer |-O2 -g
   ||-fno-omit-frame-pointer


[Bug c++/51477] [c++0x] ICE with initialization of invalid non-static data member

2011-12-13 Thread dodji at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=51477

--- Comment #1 from Dodji Seketeli  2011-12-13 
21:53:07 UTC ---
Candidate patch posted to
http://gcc.gnu.org/ml/gcc-patches/2011-12/msg01052.html


[Bug bootstrap/51537] New: ICE in verify_flow_info while building libstdc++-v3

2011-12-13 Thread rmansfield at qnx dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=51537

 Bug #: 51537
   Summary: ICE in verify_flow_info while building libstdc++-v3
Classification: Unclassified
   Product: gcc
   Version: 4.7.0
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: bootstrap
AssignedTo: unassig...@gcc.gnu.org
ReportedBy: rmansfi...@qnx.com
  Host: x86_64-linux-gnu
Target: arm-unknown-linux-gnueabi
 Build: x86_64-linux-gnu


ICE building libstdc++-v3 on trunk. It started in the last day or so. Might be
a duplicate. I'll try to narrow down the rev

make[4]: Entering directory
`/home/ryan/gnu/gcc/trunk/arm-eabi/arm-unknown-linux-gnueabi/libstdc++-v3/src'
/bin/bash ../libtool --tag CXX   --mode=compile
/home/ryan/gnu/gcc/trunk/arm-eabi/./gcc/xgcc -shared-libgcc
-B/home/ryan/gnu/gcc/trunk/arm-eabi/./gcc -nostdinc++
-L/home/ryan/gnu/gcc/trunk/arm-eabi/arm-unknown-linux-gnueabi/libstdc++-v3/src
-L/home/ryan/gnu/gcc/trunk/arm-eabi/arm-unknown-linux-gnueabi/libstdc++-v3/src/.libs
-B/home/ryan/x-tools/arm-unknown-linux-gnueabi/arm-unknown-linux-gnueabi/bin/
-B/home/ryan/x-tools/arm-unknown-linux-gnueabi/arm-unknown-linux-gnueabi/lib/
-isystem
/home/ryan/x-tools/arm-unknown-linux-gnueabi/arm-unknown-linux-gnueabi/include
-isystem
/home/ryan/x-tools/arm-unknown-linux-gnueabi/arm-unknown-linux-gnueabi/sys-include
   
-I/home/ryan/gnu/gcc/trunk/arm-eabi/arm-unknown-linux-gnueabi/libstdc++-v3/include/arm-unknown-linux-gnueabi
-I/home/ryan/gnu/gcc/trunk/arm-eabi/arm-unknown-linux-gnueabi/libstdc++-v3/include
-I/home/ryan/gnu/gcc/trunk/libstdc++-v3/libsupc++  -fno-implicit-templates
-Wall -Wextra -Wwrite-strings -Wcast-qual  -fdiagnostics-show-location=once 
-ffunction-sections -fdata-sections  -frandom-seed=strstream.lo -g -Os
-I/home/ryan/gnu/gcc/trunk/arm-eabi/arm-unknown-linux-gnueabi/libstdc++-v3/include/backward
-Wno-deprecated -c ../../../../libstdc++-v3/src/strstream.cc
libtool: compile:  /home/ryan/gnu/gcc/trunk/arm-eabi/./gcc/xgcc -shared-libgcc
-B/home/ryan/gnu/gcc/trunk/arm-eabi/./gcc -nostdinc++
-L/home/ryan/gnu/gcc/trunk/arm-eabi/arm-unknown-linux-gnueabi/libstdc++-v3/src
-L/home/ryan/gnu/gcc/trunk/arm-eabi/arm-unknown-linux-gnueabi/libstdc++-v3/src/.libs
-B/home/ryan/x-tools/arm-unknown-linux-gnueabi/arm-unknown-linux-gnueabi/bin/
-B/home/ryan/x-tools/arm-unknown-linux-gnueabi/arm-unknown-linux-gnueabi/lib/
-isystem
/home/ryan/x-tools/arm-unknown-linux-gnueabi/arm-unknown-linux-gnueabi/include
-isystem
/home/ryan/x-tools/arm-unknown-linux-gnueabi/arm-unknown-linux-gnueabi/sys-include
-I/home/ryan/gnu/gcc/trunk/arm-eabi/arm-unknown-linux-gnueabi/libstdc++-v3/include/arm-unknown-linux-gnueabi
-I/home/ryan/gnu/gcc/trunk/arm-eabi/arm-unknown-linux-gnueabi/libstdc++-v3/include
-I/home/ryan/gnu/gcc/trunk/libstdc++-v3/libsupc++ -fno-implicit-templates -Wall
-Wextra -Wwrite-strings -Wcast-qual -fdiagnostics-show-location=once
-ffunction-sections -fdata-sections -frandom-seed=strstream.lo -g -Os
-I/home/ryan/gnu/gcc/trunk/arm-eabi/arm-unknown-linux-gnueabi/libstdc++-v3/include/backward
-Wno-deprecated -c ../../../../libstdc++-v3/src/strstream.cc -o strstream.o
In file included from ../../../../libstdc++-v3/src/strstream.cc:45:0:
/home/ryan/gnu/gcc/trunk/arm-eabi/arm-unknown-linux-gnueabi/libstdc++-v3/include/backward/strstream:
In member function 'void* std::istrstream::_ZTv0_n12_NSt10istrstreamD0Ev()':
/home/ryan/gnu/gcc/trunk/arm-eabi/arm-unknown-linux-gnueabi/libstdc++-v3/include/backward/strstream:134:13:
error: fallthru to exit from bb 2
/home/ryan/gnu/gcc/trunk/arm-eabi/arm-unknown-linux-gnueabi/libstdc++-v3/include/backward/strstream:134:13:
error: fallthru edge after a control statement in bb 2
/home/ryan/gnu/gcc/trunk/arm-eabi/arm-unknown-linux-gnueabi/libstdc++-v3/include/backward/strstream:134:13:
error: wrong outgoing edge flags at end of bb 2
/home/ryan/gnu/gcc/trunk/arm-eabi/arm-unknown-linux-gnueabi/libstdc++-v3/include/backward/strstream:134:13:
internal compiler error: verify_flow_info failed
Please submit a full bug report,
with preprocessed source if appropriate.
See  for instructions.
make[4]: *** [strstream.lo] Error 1
make[4]: Leaving directory
`/home/ryan/gnu/gcc/trunk/arm-eabi/arm-unknown-linux-gnueabi/libstdc++-v3/src'


[Bug middle-end/51521] [4.7 Regression]: build fails on cris-elf building libstdc++-v3: verify_flow_info failed

2011-12-13 Thread pinskia at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=51521

Andrew Pinski  changed:

   What|Removed |Added

 CC||rmansfield at qnx dot com

--- Comment #7 from Andrew Pinski  2011-12-13 
21:57:39 UTC ---
*** Bug 51537 has been marked as a duplicate of this bug. ***


  1   2   >