[Bug c/52977] internal compiler error: Segmentation fault with `-x c-header' or `-x cxx-header' option

2012-04-13 Thread markus at trippelsdorf dot de
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=52977

Markus Trippelsdorf  changed:

   What|Removed |Added

 CC||markus at trippelsdorf dot
   ||de, rguenth at gcc dot
   ||gnu.org

--- Comment #1 from Markus Trippelsdorf  
2012-04-14 06:24:34 UTC ---
Started with rev.185458.

 % cat test.i
fn1 () 
{
  (int __attribute__((__vector_size__(8 0L;
}

or

 % cat test.ii
typedef int __m64 __attribute__ ((__vector_size__ (8)));
__m64 a = (__m64) 0LL;


[Bug tree-optimization/52081] Missed tail merging with pure calls

2012-04-13 Thread vries at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=52081

vries at gcc dot gnu.org changed:

   What|Removed |Added

 Status|UNCONFIRMED |RESOLVED
 Resolution||FIXED

--- Comment #3 from vries at gcc dot gnu.org 2012-04-14 06:04:03 UTC ---
Fixed in r186447.


[Bug translation/52984] New: Different information message in Turkish locale.

2012-04-13 Thread yasar11732 at gmail dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=52984

 Bug #: 52984
   Summary: Different information message in Turkish locale.
Classification: Unclassified
   Product: gcc
   Version: 4.6.3
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: translation
AssignedTo: unassig...@gcc.gnu.org
ReportedBy: yasar11...@gmail.com


I am getting different error messages on Turkish locale, for example, given
this header:

(dummy.h)
=
char *dummy(const char *);
=


and this c file
(dummy.c)
==
#include "dummy.h"
char dummy(char *arg) {
return 'a';
}

int main(int argc, const char *argv[])
{

return 0;
}

=

Issuing `gcc dummy.c` gives this output on Turkish locale:
dummy.c:2:6: hata: 'dummy' için çelişen türler
dummy.c:2:1: bilgi: 'dummy''nin önceki bildirimi buradaydı
But issuing `LC_ALL=C gcc dummy.c` gives this output
dummy.c:2:6: error: conflicting types for 'dummy'
dummy.h:2:7: note: previous declaration of 'dummy' was here

As you can see, in Turkish locale, it reports that previous declaration was on
the same line, while in C locale, it correctly reports where was the previous
declaration.


[Bug middle-end/52980] [4.8 Regression] Many benchmarks in SPEC CPU 2000/2006 failed to build

2012-04-13 Thread wschmidt at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=52980

--- Comment #4 from William J. Schmidt  2012-04-14 
00:07:11 UTC ---
I've found that the cpu2006 failures are fixed by the patch in PR52976.  I have
to leave for an obligation tonight, but will investigate the remaining failures
in these two issues tomorrow -- they all have the same symptom, so hopefully
only one remaining problem.


[Bug c++/52672] internal compiler error: in cxx_eval_indirect_ref, at cp/semantics.c:6766

2012-04-13 Thread meadori at codesourcery dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=52672

--- Comment #6 from Meador Inge  2012-04-13 
23:07:09 UTC ---
Should the fix for this go into 4.6 as well?  If not, then I will close the
issue.


[Bug middle-end/52980] [4.8 Regression] Many benchmarks in SPEC CPU 2000/2006 failed to build

2012-04-13 Thread hjl.tools at gmail dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=52980

H.J. Lu  changed:

   What|Removed |Added

Summary|[4.8 Regression] Many   |[4.8 Regression] Many
   |benchmarks in SPEC CPU 2000 |benchmarks in SPEC CPU
   |failed to build |2000/2006 failed to build

--- Comment #3 from H.J. Lu  2012-04-13 23:03:18 
UTC ---
Many benchmarks in SPEC CPU 2006 also failed to build with
similar error messages:

416.gamess
435.gromacs
453.povray
454.calculix
465.tonto
481.wrf


[Bug c++/24985] caret diagnostics

2012-04-13 Thread manu at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=24985

Manuel López-Ibáñez  changed:

   What|Removed |Added

  Attachment #27089|0   |1
is obsolete||
  Attachment #27093|0   |1
is obsolete||

--- Comment #49 from Manuel López-Ibáñez  2012-04-13 
22:59:12 UTC ---
Created attachment 27155
  --> http://gcc.gnu.org/bugzilla/attachment.cgi?id=27155
fix overload carets

The patch that I am currently bootstrapping. I made a small change to the
output. It looks like this now:

caret-overload.C:102:6: error: no matching function for call to ‘f(int)’
   f(1);
  ^
note: candidates are:
caret-overload.C:1:6: note: void f()
  note:   candidate expects 0 arguments, 1 provided
 void f();
  ^
caret-overload.C:10:6: note: void f(int, int)
   note:   candidate expects 2 arguments, 1 provided
 void f(int,int);
  ^


But if you don't like it, I can switch off the DI_HIDE_PREFIX for the failure
reason. Note that the notes without prefix will be perfectly aligned with the
previous message.


[Bug middle-end/52980] [4.8 Regression] Many benchmarks in SPEC CPU 2000 failed to build

2012-04-13 Thread wschmidt at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=52980

William J. Schmidt  changed:

   What|Removed |Added

 Status|UNCONFIRMED |ASSIGNED
   Last reconfirmed||2012-04-13
 CC||bergner at gcc dot gnu.org,
   ||wschmidt at gcc dot gnu.org
 AssignedTo|unassigned at gcc dot   |wschmidt at gcc dot gnu.org
   |gnu.org |
 Ever Confirmed|0   |1

--- Comment #2 from William J. Schmidt  2012-04-13 
22:46:27 UTC ---
Not a (complete) duplicate.  The proposed fix for 52976 does take care of the
252.eon failures, but 188.ammp, 200.sixtract, and 301.apsi have some other
problem.  Investigating.


[Bug target/45053] libgcc_s link command misses crtsavgpr_s and crtresgpr_s for powerpc

2012-04-13 Thread rhabarber1848 at web dot de
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=45053

--- Comment #11 from rhabarber1848 at web dot de 2012-04-13 22:35:58 UTC ---
Using this patch solves the problem here:
https://dev.openwrt.org/browser/trunk/toolchain/gcc/patches/4.7.0/870-ppc_no_crtsavres.patch

# ./powerpc-tuxbox-linux-gnu-gcc -v
Using built-in specs.
COLLECT_GCC=./powerpc-tuxbox-linux-gnu-gcc
COLLECT_LTO_WRAPPER=/root/tuxbox/work_eglibc_dbox2_26_470/image/cdk/libexec/gcc/powerpc-tuxbox-linux-gnu/4.7.0/lto-wrapper
Target: powerpc-tuxbox-linux-gnu
Configured with: ../gcc-4.7.0/configure --build=i686-pc-linux-gnu
--host=i686-pc-linux-gnu --target=powerpc-tuxbox-linux-gnu
--prefix=/root/tuxbox/work_eglibc_dbox2_26_470/image/cdk
--with-sysroot=/root/tuxbox/work_eglibc_dbox2_26_470/image/cdkroot
--with-native-system-header-dir=/include --enable-languages=c,c++
--with-cpu=823 --with-float=soft --enable-__cxa_atexit --disable-libmudflap
--disable-libgomp --disable-libssp
--with-gmp=/root/tuxbox/work_eglibc_dbox2_26_470/image/cdk
--with-mpfr=/root/tuxbox/work_eglibc_dbox2_26_470/image/cdk
--with-ppl=/root/tuxbox/work_eglibc_dbox2_26_470/image/cdk
--with-cloog=/root/tuxbox/work_eglibc_dbox2_26_470/image/cdk
--with-host-libstdcxx='-static-libgcc -Wl,-Bstatic,-lstdc++,-Bdynamic -lm'
--enable-threads=posix --enable-target-optspace --disable-nls
--enable-clocale=generic --disable-multilib --enable-c99 --enable-long-long
--enable-symvers=gnu --enable-shared
Thread model: posix
gcc version 4.7.0 (GCC)


[Bug tree-optimization/52976] [4.8 Regression] Revision 186384 breaks the polyhedron tests aermod.f90 and doduc.f90 at -O3 -ffast-math

2012-04-13 Thread dominiq at lps dot ens.fr
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=52976

--- Comment #5 from Dominique d'Humieres  2012-04-13 
22:11:24 UTC ---
The patch in comment #4 fixes doduc.f90, but not aermod.f90 (the sources are
available at http://polyhedron.com/pb05-lin64-f90bench_SBhtml ). A reduced test
for aermod is

[macbook] lin/test% cat grdurban_red.f90
  SUBROUTINE GRDURBAN(URBWSTR, ZIURB, GRIDHT)

  IMPLICIT NONE
  INTEGER :: I
  REAL :: SW2, URBWSTR, ZIURB, GRIDHT(87)

  SAVE 

  SW2 = 1.6*(GRIDHT(I)/ZIURB)**0.667*URBWSTR**2

  END
[macbook] lin/test% gfc -c -O3 -ffast-math grdurban_red.f90
grdurban_red.f90: In function 'grdurban':
grdurban_red.f90:1:0: error: definition in block 2 follows the use
   SUBROUTINE GRDURBAN(URBWSTR, ZIURB, GRIDHT)
 ^
for SSA_NAME: reassocpow.4_1 in statement:
D.1875_14 = reassocpow.4_1 * D.1874_13;
grdurban_red.f90:1:0: internal compiler error: verify_ssa failed
   SUBROUTINE GRDURBAN(URBWSTR, ZIURB, GRIDHT)
 ^

Note that the ICE disappears if I remove the SAVE.


[Bug c++/52706] [C++11] Demangling of templates with std::nullptr_t as non-type parameter

2012-04-13 Thread jason at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=52706

Jason Merrill  changed:

   What|Removed |Added

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


[Bug target/52775] Change default for using FCFID instruction

2012-04-13 Thread meissner at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=52775

--- Comment #3 from Michael Meissner  2012-04-13 
21:55:24 UTC ---
Author: meissner
Date: Fri Apr 13 21:55:15 2012
New Revision: 186438

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=186438
Log:
[gcc]
2012-04-12  Michael Meissner  

PR target/52775
* config/rs6000/rs6000.h (TARGET_FCFID): Add TARGET_PPC_GPOPT to
the list of options to enable the FCFID instruction.
(TARGET_EXTRA_BUILTINS): Adjust comment.

[gcc/testsuite]
2012-04-12  Michael Meissner  

PR target/52775
* gcc.target/powerpc/pr52775.c: New file.



Added:
branches/gcc-4_6-branch/gcc/testsuite/gcc.target/powerpc/pr52775.c
  - copied unchanged from r186389,
trunk/gcc/testsuite/gcc.target/powerpc/pr52775.c
Modified:
branches/gcc-4_6-branch/gcc/ChangeLog
branches/gcc-4_6-branch/gcc/config/rs6000/rs6000.h
branches/gcc-4_6-branch/gcc/testsuite/ChangeLog


[Bug c++/52707] [C++11] Deleted special member function prevent type being an aggregate

2012-04-13 Thread jason at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=52707

Jason Merrill  changed:

   What|Removed |Added

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


[Bug rtl-optimization/52983] [4.8 Regression] internal compiler error: in df_uses_record, at df-scan.c:3243

2012-04-13 Thread pinskia at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=52983

Andrew Pinski  changed:

   What|Removed |Added

  Component|c++ |rtl-optimization
   Target Milestone|--- |4.8.0
Summary|internal compiler error: in |[4.8 Regression] internal
   |df_uses_record, at  |compiler error: in
   |df-scan.c:3243  |df_uses_record, at
   ||df-scan.c:3243


[Bug c++/52983] internal compiler error: in df_uses_record, at df-scan.c:3243

2012-04-13 Thread redi at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=52983

--- Comment #1 from Jonathan Wakely  2012-04-13 
21:02:32 UTC ---
The source is
libstdc++-v3/testsuite/27_io/basic_ostream/inserters_arithmetic/pod/23875.cc


[Bug c++/52983] New: internal compiler error: in df_uses_record, at df-scan.c:3243

2012-04-13 Thread redi at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=52983

 Bug #: 52983
   Summary: internal compiler error: in df_uses_record, at
df-scan.c:3243
Classification: Unclassified
   Product: gcc
   Version: 4.8.0
Status: UNCONFIRMED
  Keywords: ice-on-valid-code
  Severity: normal
  Priority: P3
 Component: c++
AssignedTo: unassig...@gcc.gnu.org
ReportedBy: r...@gcc.gnu.org
 Build: powerpc64-unknown-linux-gnu


Created attachment 27154
  --> http://gcc.gnu.org/bugzilla/attachment.cgi?id=27154
preprocessed source

$ ~/gcc/4.x/bin/g++ -m32  23875.ii  -fPIC -O2 -g -v
Using built-in specs.
COLLECT_GCC=/home/jwakely/gcc/4.x/bin/g++
COLLECT_LTO_WRAPPER=/home/jwakely/gcc/4.x/libexec/gcc/powerpc64-unknown-linux-gnu/4.8.0/lto-wrapper
Target: powerpc64-unknown-linux-gnu
Configured with: /home/jwakely/src/gcc/configure --prefix=/home/jwakely/gcc/4.x
--with-system-zlib --enable-languages=c,c++ --with-gnu-ld --with-gnu-as
--disable-libquadmath --disable-libitm --disable-libmudflap --disable-nls
--disable-bootstrap
Thread model: posix
gcc version 4.8.0 20120413 (experimental) [trunk revision 186436] (GCC) 
COLLECT_GCC_OPTIONS='-m32' '-fPIC' '-O2' '-g' '-v' '-shared-libgcc'
 /home/jwakely/gcc/4.x/libexec/gcc/powerpc64-unknown-linux-gnu/4.8.0/cc1plus
-fpreprocessed 23875.ii -quiet -dumpbase 23875.ii -m32 -auxbase 23875 -g -O2
-version -fPIC -o /tmp/ccDtf7pw.s
GNU C++ (GCC) version 4.8.0 20120413 (experimental) [trunk revision 186436]
(powerpc64-unknown-linux-gnu)
compiled by GNU C version 4.6.2 20111027 (Red Hat 4.6.2-1), GMP version
4.3.2, MPFR version 2.4.2, MPC version 0.8.1
GGC heuristics: --param ggc-min-expand=30 --param ggc-min-heapsize=4096
GNU C++ (GCC) version 4.8.0 20120413 (experimental) [trunk revision 186436]
(powerpc64-unknown-linux-gnu)
compiled by GNU C version 4.6.2 20111027 (Red Hat 4.6.2-1), GMP version
4.3.2, MPFR version 2.4.2, MPC version 0.8.1
GGC heuristics: --param ggc-min-expand=30 --param ggc-min-heapsize=4096
Compiler executable checksum: b25903b7e9a48fba208e5bb0f20164ad
/home/jwakely/src/gcc/libstdc++-v3/testsuite/27_io/basic_ostream/inserters_arithmetic/pod/23875.cc:
In function 'void test01()':
/home/jwakely/src/gcc/libstdc++-v3/testsuite/27_io/basic_ostream/inserters_arithmetic/pod/23875.cc:78:1:
internal compiler error: in df_uses_record, at df-scan.c:3243
 }
 ^
Please submit a full bug report,
with preprocessed source if appropriate.
See <http://gcc.gnu.org/bugs.html> for instructions.


[Bug libstdc++/52839] [4.7/4.8 Regression] double free or corruption running tr1/.../default_weaktoshared.exe

2012-04-13 Thread redi at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=52839

Jonathan Wakely  changed:

   What|Removed |Added

   Target Milestone|--- |4.7.1
Summary|double free or corruption   |[4.7/4.8 Regression] double
   |running |free or corruption running
   |tr1/.../default_weaktoshare |tr1/.../default_weaktoshare
   |d.exe   |d.exe

--- Comment #30 from Jonathan Wakely  2012-04-13 
20:51:57 UTC ---
Alan, please send the attached patch to the libstdc++ and gcc-patches lists and
check it in to trunk (with the regenerated 'configure') with my approval.  It
should go on the 4.7 branch too, but maybe wait a day or two for any problems
to show up on trunk.


[Bug c++/52978] Inherit from Template with specified type and override virtual function

2012-04-13 Thread redi at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=52978

--- Comment #5 from Jonathan Wakely  2012-04-13 
20:48:13 UTC ---
No, that's absolutely not how C++ works.  Templates are not macros.

The template's function parameter is "const T&" aka "T const&"
i.e. a reference to a const T

If T is a pointer then it is a reference to a const pointer.  That's not the
same as a reference to a pointer to const.

http://www.parashift.com/c++-faq-lite/const-correctness.html#faq-18.4


[Bug tree-optimization/52976] [4.8 Regression] Revision 186384 breaks the polyhedron tests aermod.f90 and doduc.f90 at -O3 -ffast-math

2012-04-13 Thread wschmidt at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=52976

--- Comment #4 from William J. Schmidt  2012-04-13 
20:46:27 UTC ---
Here's a patch that fixes the reduced test case but is otherwise untested.  I
don't know what "the polyhedron tests aermod.490 and doduc.f90" are; I don't
find them in the gcc testsuite.  Dominique, can you please try this patch on
those?  I will do some regression testing and try the patch out on SPEC in the
meanwhile.

Index: gcc/tree-ssa-reassoc.c
===
--- gcc/tree-ssa-reassoc.c(revision 186393)
+++ gcc/tree-ssa-reassoc.c(working copy)
@@ -1200,6 +1200,7 @@ undistribute_ops_list (enum tree_code opcode,
   dcode = gimple_assign_rhs_code (oe1def);
   if ((dcode != MULT_EXPR
&& dcode != RDIV_EXPR)
+  || oe1->count != 1
   || !is_reassociable_op (oe1def, dcode, loop))
 continue;

@@ -1243,6 +1244,8 @@ undistribute_ops_list (enum tree_code opcode,
   oecount c;
   void **slot;
   size_t idx;
+  if (oe1->count != 1)
+continue;
   c.oecode = oecode;
   c.cnt = 1;
   c.id = next_oecount_id++;
@@ -1311,7 +1314,7 @@ undistribute_ops_list (enum tree_code opcode,

   FOR_EACH_VEC_ELT (operand_entry_t, subops[i], j, oe1)
 {
-  if (oe1->op == c->op)
+  if (oe1->op == c->op && oe1->count == 1)
 {
   SET_BIT (candidates2, i);
   ++nr_candidates2;


[Bug c++/52978] Inherit from Template with specified type and override virtual function

2012-04-13 Thread benediktibk at aon dot at
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=52978

--- Comment #4 from Benedikt Schmidt  2012-04-13 
20:22:44 UTC ---
Okay, first: Thanks for the fast reply.

Why changes the use of an template the order, in which const affects the type?
I mean, if I just replace the T in the base class with the specified type
(int*), then I get the same thing. I thought this is the way templates work,
they just stupidly replace the template parameter?


[Bug driver/52982] New: add option to select particular linker

2012-04-13 Thread fche at redhat dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=52982

 Bug #: 52982
   Summary: add option to select particular linker
Classification: Unclassified
   Product: gcc
   Version: unknown
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: driver
AssignedTo: unassig...@gcc.gnu.org
ReportedBy: f...@redhat.com


If one has both ld and gold installed, gcc gives little help in letting someone
choose one or the other for a particular link job.  (Systemwide relinking a la
alternatives(1), or forcing creation of a temporary -B directory, are not
convenient.)

Please consider adding an option to the driver, akin to -Wl... to allow
overriding of the ld binary being invoked.  Perhaps: gcc -Wl=/bin/ld.gold
(and similar options for -Wa=, -Wp= could make sense).


[Bug c++/52761] [C++11] Missing diagnostic for opaque unscoped enum declaration without base

2012-04-13 Thread jason at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=52761

Jason Merrill  changed:

   What|Removed |Added

 Status|UNCONFIRMED |NEW
   Last reconfirmed||2012-04-13
 CC||jason at gcc dot gnu.org
 Ever Confirmed|0   |1

--- Comment #1 from Jason Merrill  2012-04-13 
20:12:33 UTC ---
I think you're right.


[Bug c++/52818] printf format %lf is erroneously rejected by C++11

2012-04-13 Thread jason at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=52818

Jason Merrill  changed:

   What|Removed |Added

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


[Bug c++/52915] [C++11] Deleted default-constructor of anonymous unions not honored

2012-04-13 Thread jason at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=52915

Jason Merrill  changed:

   What|Removed |Added

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

--- Comment #2 from Jason Merrill  2012-04-13 
19:53:28 UTC ---
Fixed for 4.8.


[Bug c++/52905] [C++0x] ice on invalid brace-enclosed initializer of vector of enums

2012-04-13 Thread jason at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=52905

Jason Merrill  changed:

   What|Removed |Added

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

--- Comment #4 from Jason Merrill  2012-04-13 
19:52:31 UTC ---
Fixed for 4.8.


[Bug c++/52906] [4.7 Regression] ICE: SIGSEGV in check_tag_decl (decl.c:4230) with "__attribute__ ((__deprecated__));" alone

2012-04-13 Thread jason at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=52906

Jason Merrill  changed:

   What|Removed |Added

 Status|ASSIGNED|RESOLVED
 Resolution||FIXED

--- Comment #4 from Jason Merrill  2012-04-13 
19:51:03 UTC ---
Fixed.


[Bug c++/52824] [C++11] expanding variadic template arguments into non-variadic template

2012-04-13 Thread jason at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=52824

Jason Merrill  changed:

   What|Removed |Added

 Status|ASSIGNED|RESOLVED
 Resolution||FIXED

--- Comment #4 from Jason Merrill  2012-04-13 
19:49:45 UTC ---
.


[Bug c++/52824] [C++11] expanding variadic template arguments into non-variadic template

2012-04-13 Thread jason at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=52824

Jason Merrill  changed:

   What|Removed |Added

   Target Milestone|--- |4.7.1

--- Comment #3 from Jason Merrill  2012-04-13 
19:48:39 UTC ---
Fixed for 4.7.1.


[Bug c++/52915] [C++11] Deleted default-constructor of anonymous unions not honored

2012-04-13 Thread jason at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=52915

--- Comment #1 from Jason Merrill  2012-04-13 
19:43:43 UTC ---
Author: jason
Date: Fri Apr 13 19:43:37 2012
New Revision: 186432

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=186432
Log:
PR c++/52915
* decl2.c (finish_anon_union): Use cp_finish_decl.
* error.c (dump_function_name): Avoid showing anonymous "name".

Added:
trunk/gcc/testsuite/g++.dg/other/anon-union2.C
Modified:
trunk/gcc/cp/ChangeLog
trunk/gcc/cp/decl2.c
trunk/gcc/cp/error.c
trunk/gcc/testsuite/ChangeLog


[Bug c++/52906] [4.7 Regression] ICE: SIGSEGV in check_tag_decl (decl.c:4230) with "__attribute__ ((__deprecated__));" alone

2012-04-13 Thread jason at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=52906

--- Comment #3 from Jason Merrill  2012-04-13 
19:44:21 UTC ---
Author: jason
Date: Fri Apr 13 19:44:15 2012
New Revision: 186435

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=186435
Log:
PR c++/52906
* decl.c (check_tag_decl): Don't complain about attributes if we
don't even have a type.

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


[Bug tree-optimization/52976] [4.8 Regression] Revision 186384 breaks the polyhedron tests aermod.f90 and doduc.f90 at -O3 -ffast-math

2012-04-13 Thread wschmidt at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=52976

--- Comment #3 from William J. Schmidt  2012-04-13 
19:41:18 UTC ---
When changing from the original form of the patch to the form that recorded
repeated ops in the ops table, I missed the effect on undistribution where a
term contains a multiply of a repeated op.  Those terms should be excluded from
undistribution to return to the former behavior, and I'll work on fixing that
for the short term.  However, it would eventually be better to factor a P out
of the example in this case:

c1 + 2.*P*c2 + 3.*P**2*c3 ==>  c1 + P * (2.*c2 + 3.*P*c3)

In the original form of the patch, this was handled naturally because P**2 was
expanded into P*P and the existing logic was sufficient.  I just missed the
need to add some logic to undistribution.


[Bug c++/52824] [C++11] expanding variadic template arguments into non-variadic template

2012-04-13 Thread jason at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=52824

--- Comment #2 from Jason Merrill  2012-04-13 
19:44:31 UTC ---
Author: jason
Date: Fri Apr 13 19:44:27 2012
New Revision: 186436

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=186436
Log:
PR c++/52824
* pt.c (any_pack_expanson_args_p): New.
(coerce_template_parms): Use it.

Added:
branches/gcc-4_7-branch/gcc/testsuite/g++.dg/cpp0x/variadic123.C
Modified:
branches/gcc-4_7-branch/gcc/cp/ChangeLog
branches/gcc-4_7-branch/gcc/cp/pt.c
branches/gcc-4_7-branch/gcc/testsuite/ChangeLog
branches/gcc-4_7-branch/gcc/testsuite/g++.dg/cpp0x/alias-decl-15.C


[Bug c++/52824] [C++11] expanding variadic template arguments into non-variadic template

2012-04-13 Thread jason at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=52824

--- Comment #1 from Jason Merrill  2012-04-13 
19:44:05 UTC ---
Author: jason
Date: Fri Apr 13 19:43:57 2012
New Revision: 186434

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=186434
Log:
PR c++/52824
* pt.c (any_pack_expanson_args_p): New.
(coerce_template_parms): Use it.

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


[Bug c++/52905] [C++0x] ice on invalid brace-enclosed initializer of vector of enums

2012-04-13 Thread jason at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=52905

--- Comment #3 from Jason Merrill  2012-04-13 
19:43:52 UTC ---
Author: jason
Date: Fri Apr 13 19:43:47 2012
New Revision: 186433

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=186433
Log:
PR c++/52905
* call.c (joust): Handle comparing list and non-list ctors.

Added:
trunk/gcc/testsuite/g++.dg/cpp0x/initlist-ctor1.C
Modified:
trunk/gcc/cp/ChangeLog
trunk/gcc/cp/call.c
trunk/gcc/testsuite/ChangeLog


[Bug c++/24985] caret diagnostics

2012-04-13 Thread manu at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=24985

--- Comment #48 from Manuel López-Ibáñez  2012-04-13 
19:40:53 UTC ---
(In reply to comment #47)
> Jonathan's proposed output looks fine to me.  The "candidates are" note had a
> source location for the sake of dejagnu, but we can deal with that by 
> adjusting
> the prune.exp note handling.

OK, so I will do that.

> But I also want a general solution to the issue of multiple diagnostics with
> the same source location; overload resolution isn't the only example.

Yes, we should disable the caret if the last caret printed was at the same
location.

> I think suppressing the caret by default for notes makes sense.

There are a lot of notes that give useful info with carets. Like "declared
here". And notes are used for macro expansion. Anyway, I will have to add some
kind of inform_without_locus("") to implement the above, so if we decide to
switch all notes to use it, the implementation will be ready.


[Bug tree-optimization/52734] [4.7/4.8 Regression] Incorrect optimization of uClibc sbrk()

2012-04-13 Thread sedat.dilek at gmail dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=52734

--- Comment #17 from Sedat Dilek  2012-04-13 
19:38:24 UTC ---
Thanks, Tom!


[Bug tree-optimization/52734] [4.7/4.8 Regression] Incorrect optimization of uClibc sbrk()

2012-04-13 Thread vries at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=52734

vries at gcc dot gnu.org changed:

   What|Removed |Added

 Status|NEW |RESOLVED
 Resolution||FIXED

--- Comment #16 from vries at gcc dot gnu.org 2012-04-13 19:32:27 UTC ---
Fixed in trunk: r186418
Fixed in 4.7 branch: r186424


[Bug c++/52824] [C++11] expanding variadic template arguments into non-variadic template

2012-04-13 Thread jason at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=52824

Jason Merrill  changed:

   What|Removed |Added

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


[Bug c++/52961] Missing warning on empty if

2012-04-13 Thread jason at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=52961

--- Comment #5 from Jason Merrill  2012-04-13 
19:07:58 UTC ---
Specifically about if(); without an else, sure.


[Bug tree-optimization/52976] [4.8 Regression] Revision 186384 breaks the polyhedron tests aermod.f90 and doduc.f90 at -O3 -ffast-math

2012-04-13 Thread wschmidt at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=52976

William J. Schmidt  changed:

   What|Removed |Added

 Status|UNCONFIRMED |ASSIGNED
   Last reconfirmed||2012-04-13
 CC||bergner at gcc dot gnu.org
 AssignedTo|unassigned at gcc dot   |wschmidt at gcc dot gnu.org
   |gnu.org |
 Ever Confirmed|0   |1

--- Comment #2 from William J. Schmidt  2012-04-13 
19:06:03 UTC ---
Investigating.


[Bug c++/24985] caret diagnostics

2012-04-13 Thread jason at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=24985

--- Comment #47 from Jason Merrill  2012-04-13 
19:04:50 UTC ---
Jonathan's proposed output looks fine to me.  The "candidates are" note had a
source location for the sake of dejagnu, but we can deal with that by adjusting
the prune.exp note handling.

But I also want a general solution to the issue of multiple diagnostics with
the same source location; overload resolution isn't the only example.

I think suppressing the caret by default for notes makes sense.


[Bug c/52981] New: Separate -Wpacked into two options

2012-04-13 Thread akurland at digi dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=52981

 Bug #: 52981
   Summary: Separate -Wpacked into two options
Classification: Unclassified
   Product: gcc
   Version: 4.7.0
Status: UNCONFIRMED
  Severity: enhancement
  Priority: P3
 Component: c
AssignedTo: unassig...@gcc.gnu.org
ReportedBy: akurl...@digi.com


The option -Wpacked reports two different warnings:

1. warning: padding struct to align ‘’
2. warning: padding struct size to alignment boundary

The first warning indicates that the structure can be reordered in such a way
as to reduce padding. The second warning simply indicates that the structure is
not a multiple of the largest primitive data type and required padding at the
end.

I find the first warning much more interesting than the second one.
Specifically I would like to control them individually using -Werror.

If we can add something like -Wpacked-align and -Wpacked-size as additional
options (while still preserving the behavior of -Wpacked) I think this would be
a valuable addition to GCC.


[Bug c++/52951] internal compiler error with c++11 initializer lists and C arrays

2012-04-13 Thread drwowe at yahoo dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=52951

D W  changed:

   What|Removed |Added

 Status|WAITING |RESOLVED
 Resolution||DUPLICATE

--- Comment #4 from D W  2012-04-13 18:23:19 UTC ---


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


[Bug c++/52743] g++-4.7.0 seg faults on overload functions.

2012-04-13 Thread drwowe at yahoo dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=52743

D W  changed:

   What|Removed |Added

 CC||drwowe at yahoo dot com

--- Comment #4 from D W  2012-04-13 18:23:19 UTC ---
*** Bug 52951 has been marked as a duplicate of this bug. ***


[Bug c++/52951] internal compiler error with c++11 initializer lists and C arrays

2012-04-13 Thread drwowe at yahoo dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=52951

--- Comment #3 from D W  2012-04-13 18:22:29 UTC ---
After a little more investigation it turns out this was fixed by the fix to bug
52743.  So I guess this is actually a dup.


[Bug tree-optimization/52976] [4.8 Regression] Revision 186384 breaks the polyhedron tests aermod.f90 and doduc.f90 at -O3 -ffast-math

2012-04-13 Thread dominiq at lps dot ens.fr
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=52976

--- Comment #1 from Dominique d'Humieres  2012-04-13 
18:10:05 UTC ---
PR52980 looks like a duplicate.


[Bug target/52932] AVX2 intrinsic _mm256_permutevar8x32_ps has wrong parameter type

2012-04-13 Thread ubizjak at gmail dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=52932

Uros Bizjak  changed:

   What|Removed |Added

URL||http://gcc.gnu.org/ml/gcc-p
   ||atches/2012-04/msg00795.htm
   ||l

--- Comment #12 from Uros Bizjak  2012-04-13 18:09:51 
UTC ---
Fixed on the trunk, needs backport to 4.7 branch.


[Bug middle-end/52980] [4.8 Regression] Many benchmarks in SPEC CPU 2000 failed to build

2012-04-13 Thread dominiq at lps dot ens.fr
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=52980

--- Comment #1 from Dominique d'Humieres  2012-04-13 
18:09:16 UTC ---
It looks like a duplicate of pr52976.


[Bug middle-end/52939] [4.7/4.8 Regression] ice in gimple_get_virt_method_for_binfo with -O3

2012-04-13 Thread jamborm at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=52939

--- Comment #6 from Martin Jambor  2012-04-13 
17:57:30 UTC ---
Author: jamborm
Date: Fri Apr 13 17:57:21 2012
New Revision: 186428

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=186428
Log:
2012-04-13  Martin Jambor  

PR middle-end/52939
* gimple-fold.c (gimple_get_virt_method_for_binfo): Bail out if
fold_ctor_reference returns a zero constant.

* testsuite/g++.dg/ipa/pr52939.C: New test.


Added:
trunk/gcc/testsuite/g++.dg/ipa/pr52939.C
Modified:
trunk/gcc/ChangeLog
trunk/gcc/gimple-fold.c
trunk/gcc/testsuite/ChangeLog


[Bug middle-end/52980] New: [4.8 Regression] Many benchmarks in SPEC CPU 2000 failed to build

2012-04-13 Thread hjl.tools at gmail dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=52980

 Bug #: 52980
   Summary: [4.8 Regression] Many benchmarks in SPEC CPU 2000
failed to build
Classification: Unclassified
   Product: gcc
   Version: 4.8.0
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: middle-end
AssignedTo: unassig...@gcc.gnu.org
ReportedBy: hjl.to...@gmail.com
CC: areg.melikadam...@gmail.com


On Linux/x86-64, revision 186419 failed to build many benchmarks:

Error with make 'specmake -j `/usr/bin/getconf _NPROCESSORS_ONLN` build >
make.out 2> make.err': check file
'/export/gnu/import/git/gcc-test-spec/spec/2000/x86_64/spec/benchspec/CINT2000/252.eon/run/0001/make.err'

ggOakSolidTexture.cc: In member function 'virtual ggBoolean
ggOakSolidTexture::getTexture(const ggPoint3&, ggSpectrum&, double&) const':
ggOakSolidTexture.cc:33:11: internal compiler error: gimple check: expected
gimple_assign(error_mark), have gimple_call() in gimple_assign_rhs1, at
gimple.h:1850
 ggBoolean ggOakSolidTexture::getTexture(const ggPoint3& p,
   ^
Please submit a full bug report,
with preprocessed source if appropriate.
See  for instructions.
specmake[3]: *** [ggOakSolidTexture.o] Error 1
specmake[3]: *** Waiting for unfinished jobs

Error with make 'specmake -j `/usr/bin/getconf _NPROCESSORS_ONLN` build >
make.out 2> make.err': check file
'/export/gnu/import/git/gcc-test-spec/spec/2000/x86_64/spec/benchspec/CFP2000/188.ammp/run/0001/make.err'

angle.c: In function 'v_mmangle':
angle.c:321:5: error: definition in block 8 follows the use
 int v_mmangle( V, lambda )
 ^
for SSA_NAME: reassocpow.66_113 in statement:
D.5306_80 = reassocpow.66_113 * D.5304_78;
angle.c:321:5: internal compiler error: verify_ssa failed
 int v_mmangle( V, lambda )
 ^
Please submit a full bug report,
with preprocessed source if appropriate.
See  for instructions.
specmake[3]: *** [angle.o] Error 1

Error with make 'specmake -j `/usr/bin/getconf _NPROCESSORS_ONLN` build >
make.out 2> make.err': check file
'/export/gnu/import/git/gcc-test-spec/spec/2000/x86_64/spec/benchspec/CFP2000/200.sixtrack/run/0001/make.err'

foxys.f: In function 'dafunt':
foxys.f:4119:0: internal compiler error: gimple check: expected
gimple_assign(error_mark), have gimple_call() in gimple_assign_rhs1, at
gimple.h:1850
   SUBROUTINE DAFUNT(CF,INA,INC)
 ^
Please submit a full bug report,
with preprocessed source if appropriate.
See  for instructions.
specmake[3]: *** [foxys.o] Error 1
specmake[3]: *** Waiting for unfinished jobs

Error with make 'specmake -j `/usr/bin/getconf _NPROCESSORS_ONLN` build >
make.out 2> make.err': check file
'/export/gnu/import/git/gcc-test-spec/spec/2000/x86_64/spec/benchspec/CFP2000/301.apsi/run/0001/make.err'

apsi.f: In function 'ucrank':
apsi.f:2795:0: error: definition in block 5 follows the use
   SUBROUTINE UCRANK(DKS,HVAR,HELP,HELPA,NS,DELTAT,DELS,DZ,W,FORCN,
 ^
for SSA_NAME: reassocpow.2478_41 in statement:
D.17727_28 = reassocpow.2478_41 * frst_11;
apsi.f:2795:0: internal compiler error: verify_ssa failed
   SUBROUTINE UCRANK(DKS,HVAR,HELP,HELPA,NS,DELTAT,DELS,DZ,W,FORCN,
 ^
Please submit a full bug report,
with preprocessed source if appropriate.
See  for instructions.
specmake[3]: *** [apsi.o] Error 1


Error with make 'specmake -j `/usr/bin/getconf _NPROCESSORS_ONLN` build >
make.out 2> make.err': check file
'/export/gnu/import/git/gcc-test-spec/spec/2000/x86_64/spec/benchspec/CINT2000/252.eon/run/0002/make.err'

ggOakSolidTexture.cc: In member function 'virtual ggBoolean
ggOakSolidTexture::getTexture(const ggPoint3&, ggSpectrum&, double&) const':
ggOakSolidTexture.cc:33:11: internal compiler error: gimple check: expected
gimple_assign(error_mark), have gimple_call() in gimple_assign_rhs1, at
gimple.h:1850
 ggBoolean ggOakSolidTexture::getTexture(const ggPoint3& p,
   ^
Please submit a full bug report,
with preprocessed source if appropriate.
See  for instructions.
specmake[3]: *** [ggOakSolidTexture.o] Error 1
specmake[3]: *** Waiting for unfinished jobs

Error with make 'specmake -j `/usr/bin/getconf _NPROCESSORS_ONLN` build >
make.out 2> make.err': check file
'/export/gnu/import/git/gcc-test-spec/spec/2000/x86_64/spec/benchspec/CFP2000/188.ammp/run/0002/make.err'

angle.c: In function 'v_mmangle':
angle.c:321:5: error: definition in block 8 follows the use
 int v_mmangle( V, lambda )
 ^
for SSA_NAME: reassocpow.84_113 in statement:
D.5306_80 = reassocpow.84_113 * D.5304_78;
angle.c:321:5: internal compiler error: verify_ssa failed
 int v_mmangle( V, lambda )
 ^
Please submit a full bug report,
with preprocessed source if appropriate.
See  for instructions.
specmake[3]: *

[Bug c++/52972] Pure virtual method is called instead of child's method

2012-04-13 Thread drinob at gmail dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=52972

--- Comment #6 from drinob at gmail dot com 2012-04-13 17:43:44 UTC ---
Thank you for your explanation. Now it's all clear.


[Bug c++/52978] Inherit from Template with specified type and override virtual function

2012-04-13 Thread redi at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=52978

--- Comment #3 from Jonathan Wakely  2012-04-13 
17:34:10 UTC ---
(In reply to comment #0)
> I compiled the code with the following statement:
> gcc -Wall -Wextra -save-temps -lstdc++ main.cpp

Also if you use g++ you don't need to link to libstdc++

g++ -Wall -Wextra -save-temps main.cpp


[Bug c++/52978] Inherit from Template with specified type and override virtual function

2012-04-13 Thread redi at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=52978

--- Comment #2 from Jonathan Wakely  2012-04-13 
17:33:16 UTC ---
(In reply to comment #1)
> The base class has a pure virtual function with this signature:
> 
> void blub(const int* const&) const

Oops, sorry, that should be:

void blub(int* const&) const

This is a reference to const pointer to int.


> The derived class has a virtual function with this signature:
> 
> void blub(const int*&) const
> 
> They're not the same.

This is a reference to pointer to const int.

Not the same thing.


[Bug c++/52978] Inherit from Template with specified type and override virtual function

2012-04-13 Thread redi at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=52978

Jonathan Wakely  changed:

   What|Removed |Added

 Status|UNCONFIRMED |RESOLVED
 Resolution||INVALID

--- Comment #1 from Jonathan Wakely  2012-04-13 
17:30:51 UTC ---
The base class has a pure virtual function with this signature:

void blub(const int* const&) const

The derived class has a virtual function with this signature:

void blub(const int*&) const

They're not the same.


[Bug c++/52972] Pure virtual method is called instead of child's method

2012-04-13 Thread redi at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=52972

--- Comment #5 from Jonathan Wakely  2012-04-13 
17:27:33 UTC ---
The standard says "Member functions can be called from a constructor (or
destructor) of an abstract class; the effect of making a virtual call to a pure
virtual function directly or indirectly for the object being created (or
destroyed) from such a constructor (or destructor) is undefined."

The program has undefined behaviour, there is no correct or incorrect behaviour
for the compiler. Whatever the compiler does with your program does is valid. 
Including setting fire to your computer.


[Bug c++/52895] [C++0x] ICE in unify, at cp/pt.c:15802

2012-04-13 Thread jason at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=52895

Jason Merrill  changed:

   What|Removed |Added

 Status|UNCONFIRMED |RESOLVED
 CC||jason at gcc dot gnu.org
 Resolution||FIXED
   Target Milestone|--- |4.7.1

--- Comment #3 from Jason Merrill  2012-04-13 
17:07:16 UTC ---
This seems to be fixed in 4.7.


[Bug c++/52905] [C++0x] ice on invalid brace-enclosed initializer of vector of enums

2012-04-13 Thread jason at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=52905

Jason Merrill  changed:

   What|Removed |Added

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


[Bug target/52932] AVX2 intrinsic _mm256_permutevar8x32_ps has wrong parameter type

2012-04-13 Thread ubizjak at gmail dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=52932

--- Comment #11 from Uros Bizjak  2012-04-13 16:57:09 
UTC ---
(In reply to comment #10)
> _mm256_permutevar8x32_epi32 has the operands in wrong order. They need 
> to be swapped. Did you fix this too?

Yes.


[Bug target/52932] AVX2 intrinsic _mm256_permutevar8x32_ps has wrong parameter type

2012-04-13 Thread agner at agner dot org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=52932

--- Comment #10 from Agner Fog  2012-04-13 16:50:33 UTC 
---
_mm256_permutevar8x32_epi32 has the operands in wrong order. They need 
to be swapped. Did you fix this too?


On 12-04-2012 20:37, uros at gcc dot gnu.org wrote:
> http://gcc.gnu.org/bugzilla/show_bug.cgi?id=52932
>
> --- Comment #9 from uros at gcc dot gnu.org 2012-04-12 18:37:47 UTC ---
> Author: uros
> Date: Thu Apr 12 18:37:42 2012
> New Revision: 186388
>
> URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=186388
> Log:
>  PR target/52932
>  * config/i386/avx2intrin.h (_mm256_permutevar8x32_ps): Change second
>  argument type to __m256i.  Update call to __builtin_ia32_permvarsf256.
>  * config/i386/sse.md (UNSPEC_VPERMVAR): New.
>  (UNSPEC_VPERMSI, UNSPEC_VPERMSF): Remove.
>  (avx2_permvarv8sf, avx2_permvarv8si): Switch operands 1 and 2.
>  (avx2_permvar): Macroize insn from avx2_permvarv8sf and
>  avx2_permvarv8si using VI4F_256 mode iterator.
>  * config/i386/i386.c (bdesc_args)<__builtin_ia32_permvarsf256>:
>  Update builtin type to V8SF_FTYPE_V8SF_V8SI.
>  (ix86_expand_vec_perm): Update calls to gen_avx2_permvarv8si and
>  gen_avx2_permvarv8sf.
>  (expand_vec_perm_pshufb): Ditto.
>
> testsuite/ChangeLog:
>
>  PR target/52932
>  * gcc.target/i386/avx2-vpermps-1.c (avx2_test): Use __m256i type for
>  second function argument.
>  * gcc.target/i386/avx2-vpermps-2.c (init_permps): Update declaration.
>  (calc_permps): Update declaration.  Calculate result correctly.
>  (avx2_test): Change src2 type to union256i_d.
>  * gcc.target/i386/avx2-vpermd-2.c (calc_permd): Calculate result
>  correctly.
>
>
> Modified:
>  trunk/gcc/ChangeLog
>  trunk/gcc/config/i386/avx2intrin.h
>  trunk/gcc/config/i386/i386.c
>  trunk/gcc/config/i386/sse.md
>  trunk/gcc/testsuite/ChangeLog
>  trunk/gcc/testsuite/gcc.target/i386/avx2-vpermd-2.c
>  trunk/gcc/testsuite/gcc.target/i386/avx2-vpermps-1.c
>  trunk/gcc/testsuite/gcc.target/i386/avx2-vpermps-2.c
>


[Bug c++/52972] Pure virtual method is called instead of child's method

2012-04-13 Thread drinob at gmail dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=52972

--- Comment #4 from drinob at gmail dot com 2012-04-13 16:35:35 UTC ---
But it seems to work in g++ 4.3 (which is used at ideone.com):
http://ideone.com/zy5R4
Is that behavior uncorrect?


[Bug c/52979] New: likely wrong code bug w/packed bitfields

2012-04-13 Thread regehr at cs dot utah.edu
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=52979

 Bug #: 52979
   Summary: likely wrong code bug w/packed bitfields
Classification: Unclassified
   Product: gcc
   Version: 4.8.0
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: c
AssignedTo: unassig...@gcc.gnu.org
ReportedBy: reg...@cs.utah.edu
CC: cheny...@cs.utah.edu


[regehr@dyson r30]$ current-gcc -O2 small.c ; ./a.out 
0
[regehr@dyson r30]$ current-gcc -O3 small.c ; ./a.out 
1
[regehr@dyson r30]$ cat small.c
int printf (const char *, ...);
int c, d, e;

void fn1 ()
{
}

#pragma pack(1)
struct S1
{
int f0:31;
int f1:6;
} 
a = { 1 };

static struct S1 b = { 1 };

void fn2 ()
{
for (;;)
{
a.f1 = 1;
struct S1 f = { };
b = f;
e = 0;
if (d)
c = a.f0;
break;
}
}

void fn3 ()
{
fn2 ();
a = b;
}

int main (void)
{
fn3 ();
printf ("%d\n", a.f0);
return 0;
}
[regehr@dyson r30]$ current-gcc -v
Using built-in specs.
COLLECT_GCC=current-gcc
COLLECT_LTO_WRAPPER=/uusoc/exports/scratch/regehr/z/compiler-install/gcc-r186403-install/bin/../libexec/gcc/x86_64-unknown-linux-gnu/4.8.0/lto-wrapper
Target: x86_64-unknown-linux-gnu
Configured with: ../configure --with-libelf=/usr/local --enable-lto
--prefix=/home/regehr/z/compiler-install/gcc-r186403-install
--program-prefix=r186403- --enable-languages=c,c++
Thread model: posix
gcc version 4.8.0 20120413 (experimental) (GCC)


[Bug c++/52978] New: Inherit from Template with specified type and override virtual function

2012-04-13 Thread benediktibk at aon dot at
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=52978

 Bug #: 52978
   Summary: Inherit from Template with specified type and override
virtual function
Classification: Unclassified
   Product: gcc
   Version: 4.5.3
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: c++
AssignedTo: unassig...@gcc.gnu.org
ReportedBy: benedikt...@aon.at


Created attachment 27153
  --> http://gcc.gnu.org/bugzilla/attachment.cgi?id=27153
preprocessed file

I tried to inherit from an template, but with an specified type. In this
derived class a virtual function from the base (the template class) is
overriden. During compile gcc complains about a pure virtual function if I try
to instantiate an object from the derived type.

I compiled the code with the following statement:
gcc -Wall -Wextra -save-temps -lstdc++ main.cpp

The code looks like this:
#include 

template
class Foo
{
  public:
  virtual void blub(const T &value) const = 0;
};

class Bar : public Foo
{
  public:
  virtual void blub(const int* &value) const
  {
printf("\n%i\n", *value);
  }
};

int main(int argc, char **argv)
{
  Bar bar;
  const int *one = new int;

  bar.blub(one);

  return 0;
}

The output from the compiler was that:
main.cpp: In Funktion »int main(int, char**)«:
main.cpp:21:7: Fehler: Variable »bar« kann nicht als vom abstrakten Typ »Bar«
deklariert werden
main.cpp:11:1: Anmerkung:   because the following virtual functions are pure
within »Bar«:
main.cpp:7:20: Anmerkung:   void Foo::blub(const T&) const [with T =
int*]
main.cpp: At global scope:
main.cpp:19:5: Warnung: unbenutzter Parameter »argc«
main.cpp:19:5: Warnung: unbenutzter Parameter »argv«
make: *** [all] Fehler 1 

Im running gcc version 4.5.3-r2 on Gentoo.


[Bug c++/52972] Pure virtual method is called instead of child's method

2012-04-13 Thread drinob at gmail dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=52972

--- Comment #3 from drinob at gmail dot com 2012-04-13 16:28:36 UTC ---
Yes, this is my mistake.


[Bug c++/52972] Pure virtual method is called instead of child's method

2012-04-13 Thread redi at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=52972

Jonathan Wakely  changed:

   What|Removed |Added

 Status|UNCONFIRMED |RESOLVED
 Resolution||INVALID

--- Comment #2 from Jonathan Wakely  2012-04-13 
16:27:44 UTC ---
right, during the base constructor the derived class hasn't been constructed
yet and you can't call its virtual functions


[Bug c++/52972] Pure virtual method is called instead of child's method

2012-04-13 Thread pinskia at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=52972

--- Comment #1 from Andrew Pinski  2012-04-13 
16:24:07 UTC ---
I think you are getting the correct behavior as the vtable for the base class
is the current vtable for this.

And "return static_cast < Real* > (this);"  Does not change the vtable
of the return class.


[Bug c++/52951] internal compiler error with c++11 initializer lists and C arrays

2012-04-13 Thread drwowe at yahoo dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=52951

--- Comment #2 from D W  2012-04-13 16:22:28 UTC ---
I built gcc from gcc-4_7-branch, svn186417.  I can confirm it does not segfault
on my example.


[Bug c/52977] New: internal compiler error: Segmentation fault with `-x c-header' or `-x cxx-header' option

2012-04-13 Thread ai.azuma at gmail dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=52977

 Bug #: 52977
   Summary: internal compiler error: Segmentation fault with `-x
c-header' or `-x cxx-header' option
Classification: Unclassified
   Product: gcc
   Version: 4.8.0
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: c
AssignedTo: unassig...@gcc.gnu.org
ReportedBy: ai.az...@gmail.com


Created attachment 27152
  --> http://gcc.gnu.org/bugzilla/attachment.cgi?id=27152
Output of -v option and preprocessed file

The following code causes an ICE with GCC 4.8.0 20120408 (experimental) and `-x
c-header' or `-x cxx-header' option.



typedef int __m64 __attribute__ ((__vector_size__ (8), __may_alias__));
__inline __m64 __attribute__((__gnu_inline__, __always_inline__,
__artificial__))
_mm_setzero_si64() { return (__m64)0LL; }



N.B. As far as I can confirm, this ICE is not reproduced with GCC 4.6.3, GCC
4.7.0 and GCC 4.8.0 20120311. This reproducer originally comes from a
Boost.Math 1.49.0 source file.


[Bug debug/48866] gcc hangs when -g is set

2012-04-13 Thread aoliva at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=48866

--- Comment #12 from Alexandre Oliva  2012-04-13 
15:56:29 UTC ---
Author: aoliva
Date: Fri Apr 13 15:56:21 2012
New Revision: 186422

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=186422
Log:
PR debug/48866
* df.h (enum debug_temp_where): New.
(dead_debug_init, dead_debug_finish) Declare.
(dead_debug_add, dead_debug_insert_temp): Declare.
(struct dead_debug_use, struct dead_debug): Moved from...
* df-problems.c: ... here.
(df_set_unused_notes_for_mw): Bind debug uses of unused regno
to a debug temp.
(df_create_unused_note): Likewise.
(df_set_dead_notes_for_mw): Move comment where it belongs.
(dead_debug_init): Export.
(dead_debug_reset_uses): New, factored out of...
(dead_debug_finish): ...this.  Export.
(dead_debug_reset): Remove.
(dead_debug_add): Export.
(dead_debug_insert_before): Rename to...
(dead_debug_insert_temp): ... this.  Add where argument.  Export.
Locate stored value for BEFORE_WITH_VALUE.  Avoid repeat inserts.
Return insertion count.
(df_note_bb_compute): Adjust.
* dce.c (word_dce_process_block): Adjust dead debug uses.
(dce_process_block): Likewise.

Modified:
trunk/gcc/ChangeLog
trunk/gcc/dce.c
trunk/gcc/df-problems.c
trunk/gcc/df.h


[Bug debug/51570] [4.7/4.8 Regression] FAIL: gcc.dg/guality/pr45003-[23].c

2012-04-13 Thread aoliva at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=51570

--- Comment #7 from Alexandre Oliva  2012-04-13 
15:56:00 UTC ---
Author: aoliva
Date: Fri Apr 13 15:55:52 2012
New Revision: 186420

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=186420
Log:
PR debug/51570
* var-tracking.c (expand_depth): New type.
(onepart_aux, expand_loc_callback_data): Change depth type to it.
(loc_exp_dep_alloc): Adjust initializer.
(update_depth): Use new type.  Add entryvals.
(vt_expand_var_loc_chain): Take note of expansions with
ENTRY_VALUEs, but don't accept them right away.  Run an optional
second pass accepting the minimum ENTRY_VALUE count found in the
first pass.
(vt_expand_loc_callback, INIT_ELCD): Adjust.

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


[Bug tree-optimization/52976] New: [4.8 Regression] Revision 186384 breaks the polyhedron tests aermod.f90 and doduc.f90 at -O3 -ffast-math

2012-04-13 Thread dominiq at lps dot ens.fr
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=52976

 Bug #: 52976
   Summary: [4.8 Regression] Revision 186384 breaks the polyhedron
tests aermod.f90 and doduc.f90 at -O3 -ffast-math
Classification: Unclassified
   Product: gcc
   Version: 4.8.0
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: tree-optimization
AssignedTo: unassig...@gcc.gnu.org
ReportedBy: domi...@lps.ens.fr
CC: rgue...@gcc.gnu.org, tkoe...@gcc.gnu.org,
wschm...@gcc.gnu.org


On powerpc-apple-darwin9 and x86_64-apple-darwin10, the polyhedron tests
aermod.f90 and doduc.f90 are broken after revision 186384 at -O3 -ffast-math:

[macbook] lin/test% gfc -O3 -ffast-math -fno-tree-vectorize aermod.f90
aermod.f90: In function 'grdurban':
aermod.f90:27214:0: error: definition in block 9 follows the use
   SUBROUTINE GRDURBAN
 ^
for SSA_NAME: reassocpow.22077_36 in statement:
D.56565_32 = D.56564_31 * reassocpow.22077_36;
aermod.f90:27214:0: internal compiler error: verify_ssa failed
   SUBROUTINE GRDURBAN
 ^
[macbook] lin/test% gfc -O3 -ffast-math -fno-tree-vectorize doduc.f90
doduc.f90: In function 's55199':
doduc.f90:4384:0: internal compiler error: gimple check: expected
gimple_assign(error_mark), have gimple_call() in gimple_assign_rhs1, at
gimple.h:1850
   SUBROUTINE S55199(H,P,T,Rho,Dvdhp,Dvdph,Dtdh,Dtdp)
 ^

The SUBROUTINE S55199 can be reduced to

  SUBROUTINE S55199(P,Dvdph)
  implicit none
  real(8) :: c1,c2,c3,P,Dvdph
  c1=0.1d0
  c2=0.2d0
  c3=0.3d0
  Dvdph = c1 + 2.*P*c2 + 3.*P**2*c3
  END

which gives the following ICE at r186417

[macbook] test/doduc_tst% gfc -O3 -ffast-math -fno-tree-vectorize
s55199_red.f90 -c
s55199_red.f90: In function 's55199':
s55199_red.f90:1:0: internal compiler error: gimple check: expected
gimple_assign(error_mark), have gimple_call() in gimple_assign_rhs1, at
gimple.h:1850
   SUBROUTINE S55199(P,Dvdph)
 ^

or

s55199_red.f90: In function 's55199':
s55199_red.f90:1:0: internal compiler error: in zero_one_operation, at
tree-ssa-reassoc.c:1041
   SUBROUTINE S55199(P,Dvdph)
 ^

for gcc configured with --enable-checking=release.


[Bug libstdc++/52604] mt allocator crashes on multi-threaded

2012-04-13 Thread paolo.carlini at oracle dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=52604

--- Comment #20 from Paolo Carlini  2012-04-13 
14:45:29 UTC ---
Remember to always send the patches you commit to gcc-patc...@gcc.gnu.org (and
libstd...@gcc.gnu.org in CC), even if already approved on the fly in audit
trail (which should not happen very frequently)

PS: are you aware that your name family name in the email address and as email
sender do not match? ;)


[Bug fortran/51082] [F03] Wrong result for a pointer to a proc-pointer component

2012-04-13 Thread janus at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=51082

--- Comment #3 from janus at gcc dot gnu.org 2012-04-13 14:23:25 UTC ---
Note: The patch in comment #2 regtests cleanly.


[Bug tree-optimization/52975] Ofast produces not optimized code for vectorized "converted if"

2012-04-13 Thread rguenth at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=52975

Richard Guenther  changed:

   What|Removed |Added

 Status|UNCONFIRMED |ASSIGNED
   Keywords||missed-optimization
   Last reconfirmed||2012-04-13
  Component|rtl-optimization|tree-optimization
 AssignedTo|unassigned at gcc dot   |rguenth at gcc dot gnu.org
   |gnu.org |
 Ever Confirmed|0   |1

--- Comment #1 from Richard Guenther  2012-04-13 
14:05:12 UTC ---
Yes, I noticed this.  For scalar code we can handle the mess caused by
if-conversion in RTL optimization, for vectorized code we cannot.
I have a patch that fixes it for -O3 at least - for -Ofast we run foul
of if-conversion changing the conditions from < 0.0 to >= 0.0 on the
else branch.

I'll think about the best way of dealing with that.


[Bug fortran/52968] [OOP] Call to type-bound procedure wrongly rejected

2012-04-13 Thread janus at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=52968

--- Comment #3 from janus at gcc dot gnu.org 2012-04-13 14:02:05 UTC ---
This bug is similar to PR51995, and in fact the patch from comment #2 above
seems to supersede the solution given there (which could be removed as a
consequence):

Index: gcc/fortran/class.c
===
--- gcc/fortran/class.c(revision 186413)
+++ gcc/fortran/class.c(working copy)
@@ -541,8 +541,7 @@ gfc_build_class_symbol (gfc_typespec *ts, symbol_a
   fclass->refs++;
   fclass->ts.type = BT_UNKNOWN;
   fclass->attr.abstract = ts->u.derived->attr.abstract;
-  if (ts->u.derived->f2k_derived)
-fclass->f2k_derived = gfc_get_namespace (NULL, 0);
+  fclass->f2k_derived = gfc_get_namespace (NULL, 0);
   if (gfc_add_flavor (&fclass->attr, FL_DERIVED,
   NULL, &gfc_current_locus) == FAILURE)
 return FAILURE;
@@ -579,8 +578,6 @@ gfc_build_class_symbol (gfc_typespec *ts, symbol_a
   c->attr.access = ACCESS_PRIVATE;
   c->attr.pointer = 1;
 }
-  else if (!fclass->f2k_derived)
-fclass->f2k_derived = gfc_get_namespace (NULL, 0);

   /* Since the extension field is 8 bit wide, we can only have
  up to 255 extension levels.  */


[Bug middle-end/52939] [4.7/4.8 Regression] ice in gimple_get_virt_method_for_binfo with -O3

2012-04-13 Thread jamborm at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=52939

Martin Jambor  changed:

   What|Removed |Added

URL||http://gcc.gnu.org/ml/gcc-p
   ||atches/2012-04/msg00835.htm
   ||l

--- Comment #5 from Martin Jambor  2012-04-13 
13:55:31 UTC ---
Bah, I posted the patch to fix this with a wrong subject but there it
is:

http://gcc.gnu.org/ml/gcc-patches/2012-04/msg00835.html


[Bug c++/52974] Canonicalize include paths in diagnostics

2012-04-13 Thread redi at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=52974

--- Comment #3 from Jonathan Wakely  2012-04-13 
13:55:27 UTC ---
I don't know where they're defined but they're built in and g++ -v shows them

#include "..." search starts here:
#include <...> search starts here:

/home/redi/gcc/4.x/lib/gcc/x86_64-unknown-linux-gnu/4.8.0/../../../../include/c++/4.8.0

/home/redi/gcc/4.x/lib/gcc/x86_64-unknown-linux-gnu/4.8.0/../../../../include/c++/4.8.0/x86_64-unknown-linux-gnu

/home/redi/gcc/4.x/lib/gcc/x86_64-unknown-linux-gnu/4.8.0/../../../../include/c++/4.8.0/backward
 /home/redi/gcc/4.x/lib/gcc/x86_64-unknown-linux-gnu/4.8.0/include
 /usr/local/include
 /home/redi/gcc/4.x/include
 /home/redi/gcc/4.x/lib/gcc/x86_64-unknown-linux-gnu/4.8.0/include-fixed
 /usr/include
End of search list.

The C++ headers are the only ones that need canonicalizing.


[Bug c++/52974] Canonicalize include paths in diagnostics

2012-04-13 Thread manu at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=52974

--- Comment #2 from Manuel López-Ibáñez  2012-04-13 
13:42:51 UTC ---
(In reply to comment #0)
> This probably isn't a good idea for user headers, as the include path they use
> with -I should be preserved so they recognise it, but for GCC's own C++ 
> headers
> (and possibly all system headers?) it would be a huge improvement.

System headers are easy to detect, but what is "GCC's own C++ headers"? How can
one detect those?


[Bug libstdc++/52938] std::string::reserve request is not maintained if object is used in other object copy ctor

2012-04-13 Thread abdul.tohmaz at emc dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=52938

--- Comment #14 from Abdul Tohmaz  2012-04-13 
13:37:47 UTC ---
(In reply to comment #13)

> Immediately after you call reserve it returns at least 1024.  But not
> necessarily from that point on for ever and ever.  If you call swap() to
> exchange it with another string it's capacity could shrink, or in C++11 if you
> move assign another string to it its capacity could change. Or, in C++03 for
> reference-counted strings, it could change because the previously-shared 
> string
> is no longer shared.
> 
> This is a pointless discussion anyway, it's not going to change.

I agree with you on this discussion being pointless.
I am looking at this from the end user perspective and what the standards
dictates while you are looking at from the way gcc implements string.  Your
point about C++11 doesn't apply here (completely different ball game).  The
standard doesn't say anything about capacity for swap (21.3.5.8).  The user
expects the standard to be followed and when it says that capacity to be >= to
the reserve argument, he certainly expects that.  Unless you can show me
somewhere in the standards where it says the requested capacity via reserve
calls may be affected by copy constructor in the case an implementer chose to
use copy-on-write.  That is all I ask.


[Bug tree-optimization/52969] [4.7/4.8 Regression] ICE in in get_expr_operands, at tree-ssa-operands.c:1035 with -ftree-loop-if-convert-stores

2012-04-13 Thread vincenzo.innocente at cern dot ch
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=52969

--- Comment #13 from vincenzo Innocente  
2012-04-13 13:35:19 UTC ---
Richard, please,  look at PR59275.
I think your testcase CAN produce not optimized code.


[Bug fortran/52968] [OOP] Call to type-bound procedure produces wrongly rejected

2012-04-13 Thread janus at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=52968

janus at gcc dot gnu.org changed:

   What|Removed |Added

 Status|NEW |ASSIGNED
 AssignedTo|unassigned at gcc dot   |janus at gcc dot gnu.org
   |gnu.org |
Summary|Call to type-bound  |[OOP] Call to type-bound
   |procedure produces wrongly  |procedure produces wrongly
   |rejected|rejected

--- Comment #2 from janus at gcc dot gnu.org 2012-04-13 13:32:00 UTC ---
(In reply to comment #1)
> Next, one tries to match "% Evaluate" as type-bound procedure:
> 
>   if (sym->f2k_derived)
> tbp = gfc_find_typebound_proc (sym, &t, name, false, &gfc_current_locus);
> 
> However, the class container does not have f2k_derived - only the "_data"
> component has.

Right. The class container's f2k_derived should be set up in
'gfc_build_class_symbol'. However, this is called before the type
'EquationTemplate' is available, and setting up the f2k_derived fails for this
reason.

Patch:

Index: gcc/fortran/class.c
===
--- gcc/fortran/class.c(revision 186413)
+++ gcc/fortran/class.c(working copy)
@@ -541,8 +541,7 @@ gfc_build_class_symbol (gfc_typespec *ts, symbol_a
   fclass->refs++;
   fclass->ts.type = BT_UNKNOWN;
   fclass->attr.abstract = ts->u.derived->attr.abstract;
-  if (ts->u.derived->f2k_derived)
-fclass->f2k_derived = gfc_get_namespace (NULL, 0);
+  fclass->f2k_derived = gfc_get_namespace (NULL, 0);
   if (gfc_add_flavor (&fclass->attr, FL_DERIVED,
   NULL, &gfc_current_locus) == FAILURE)
 return FAILURE;


This makes the test case compile correctly (and is free of testsuite
regressions).


[Bug rtl-optimization/52975] New: Ofast produces not optimized code for vectorized "converted if"

2012-04-13 Thread vincenzo.innocente at cern dot ch
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=52975

 Bug #: 52975
   Summary: Ofast produces not optimized code for vectorized
"converted if"
Classification: Unclassified
   Product: gcc
   Version: 4.8.0
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: rtl-optimization
AssignedTo: unassig...@gcc.gnu.org
ReportedBy: vincenzo.innoce...@cern.ch


this is a modified version of 
gcc/testsuite/gcc.dg/torture/pr52969.c

notice 
cmpps$0x1,%xmm2,%xmm1
cmpps$0x2,%xmm3,%xmm0
in case of Ofast
similar with -march=corei7 when blendv is generated

cat ifconv2.cc
int b;
float xsum[100];
float clus[100];
void bar2 ()
{
  int j=0;
  for (; j<100 ; ++j) {
 xsum[j] = clus[j];
 if (xsum[j] > 0)
xsum[j] = 0;
 // xsum[j] = (clus[j] > 0.) ? 0. : clus[j];
  }
  if (xsum[0])
b = 0;
}


pb-d-128-141-131-26:bugs48 innocent$ c++ -O3 -c ifconv2.cc
-ftree-loop-if-convert-stores -ftree-vectorizer-verbose=2

Analyzing loop at ifconv2.cc:7


Vectorizing loop at ifconv2.cc:7

7: LOOP VECTORIZED.
ifconv2.cc:4: note: vectorized 1 loops in function.
pb-d-128-141-131-26:bugs48 innocent$ otool -t -X -v ifconv2.o
__Z4bar2v:
leaq0x(%rip),%rax
xorps%xmm2,%xmm2
leaq0x(%rip),%rdx
leaq0x0190(%rip),%rcx
nopl0x(%rax,%rax)
movaps(%rax),%xmm1
movaps%xmm2,%xmm0
addq$0x10,%rax
cmpps$0x1,%xmm1,%xmm0
andnps%xmm1,%xmm0
movaps%xmm0,(%rdx)
addq$0x10,%rdx
cmpq%rcx,%rax
jne0x0020
xorps%xmm0,%xmm0
ucomiss0x(%rip),%xmm0
jnp0x0054
movl$0x,0xfffc(%rip)
ret
jne0x0049
repz/ret
pb-d-128-141-131-26:bugs48 innocent$ c++ -Ofast -c ifconv2.cc
-ftree-loop-if-convert-stores -ftree-vectorizer-verbose=2

Analyzing loop at ifconv2.cc:7


Vectorizing loop at ifconv2.cc:7

7: LOOP VECTORIZED.
ifconv2.cc:4: note: vectorized 1 loops in function.
pb-d-128-141-131-26:bugs48 innocent$ otool -t -X -v ifconv2.o
__Z4bar2v:
leaq0x(%rip),%rdx
xorps%xmm3,%xmm3
leaq0x(%rip),%rax
leaq0x0190(%rip),%rcx
nopl0x(%rax,%rax)
movaps(%rdx),%xmm2
movaps%xmm3,%xmm1
addq$0x10,%rdx
movaps%xmm2,%xmm0
cmpps$0x1,%xmm2,%xmm1
cmpps$0x2,%xmm3,%xmm0
andnps(%rax),%xmm1
andps%xmm0,%xmm2
andnps%xmm1,%xmm0
orps%xmm2,%xmm0
movaps%xmm0,(%rax)
addq$0x10,%rax
cmpq%rcx,%rdx
jne0x0020
xorps%xmm0,%xmm0
comiss0x(%rip),%xmm0
je0x0063
movl$0x,0xfffc(%rip)
repz/ret


[Bug tree-optimization/52969] [4.7/4.8 Regression] ICE in in get_expr_operands, at tree-ssa-operands.c:1035 with -ftree-loop-if-convert-stores

2012-04-13 Thread rguenth at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=52969

--- Comment #12 from Richard Guenther  2012-04-13 
13:26:59 UTC ---
(In reply to comment #11)
> I do not have a clear case in hand with evidence of "double" compare
> I will have a closer look to "real life" code.
> 
> btw 
> I just noticed that your test case does not vectorize even if
> I rewrite as
>  for (; a ; ++j) 
>xsum[j] = (cluster[j] > 0.) ? 0. : cluster[j];
> 
> any idea why?

It's because of the loop exit condition which we realize makes the loop
execute at most once.  If you rewrite it to for (; j < a; ++j) then it works.


[Bug tree-optimization/52868] [4.7/4.8 Regression] 4.6 is faster on Atom

2012-04-13 Thread rguenth at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=52868

Richard Guenther  changed:

   What|Removed |Added

   Priority|P3  |P2


[Bug c++/52973] [4.7/4.8 Regression] visibility attribute for class is not passed to its members

2012-04-13 Thread rguenth at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=52973

Richard Guenther  changed:

   What|Removed |Added

   Priority|P3  |P2


[Bug tree-optimization/52734] [4.7/4.8 Regression] Incorrect optimization of uClibc sbrk()

2012-04-13 Thread rguenth at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=52734

Richard Guenther  changed:

   What|Removed |Added

   Priority|P3  |P2


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

2012-04-13 Thread rguenth at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=52947

Richard Guenther  changed:

   What|Removed |Added

   Priority|P3  |P2


[Bug middle-end/52939] [4.7/4.8 Regression] ice in gimple_get_virt_method_for_binfo with -O3

2012-04-13 Thread rguenth at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=52939

Richard Guenther  changed:

   What|Removed |Added

   Priority|P3  |P2


[Bug c++/52906] [4.7 Regression] ICE: SIGSEGV in check_tag_decl (decl.c:4230) with "__attribute__ ((__deprecated__));" alone

2012-04-13 Thread rguenth at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=52906

Richard Guenther  changed:

   What|Removed |Added

   Priority|P3  |P2
  Known to work||4.8.0
Summary|[4.7/4.8 Regression] ICE:   |[4.7 Regression] ICE:
   |SIGSEGV in check_tag_decl   |SIGSEGV in check_tag_decl
   |(decl.c:4230) with  |(decl.c:4230) with
   |"__attribute__  |"__attribute__
   |((__deprecated__));" alone  |((__deprecated__));" alone
  Known to fail|4.8.0   |

--- Comment #2 from Richard Guenther  2012-04-13 
13:15:41 UTC ---
Fixed on trunk sofar.


[Bug c++/52974] Canonicalize include paths in diagnostics

2012-04-13 Thread redi at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=52974

--- Comment #1 from Jonathan Wakely  2012-04-13 
13:16:01 UTC ---
The canonicalized version of that error is a lot more readable

t.cc: In function 'void f()':
t.cc:2:23: error: no matching function for call to 'sort(int)'
t.cc:2:23: note: candidates are:
In file included from /home/redi/gcc/4.x/include/c++/4.8.0/algorithm:63:0,
 from t.cc:1:
/home/redi/gcc/4.x/include/c++/4.8.0/bits/stl_algo.h:5420:5: note:
template void std::sort(_RAIter, _RAIter)
/home/redi/gcc/4.x/include/c++/4.8.0/bits/stl_algo.h:5420:5: note:   template
argument deduction/substitution failed:
t.cc:2:23: note:   candidate expects 2 arguments, 1 provided
In file included from /home/redi/gcc/4.x/include/c++/4.8.0/algorithm:63:0,
 from t.cc:1:
/home/redi/gcc/4.x/include/c++/4.8.0/bits/stl_algo.h:5456:5: note:
template void std::sort(_RAIter, _RAIter,
_Compare)
/home/redi/gcc/4.x/include/c++/4.8.0/bits/stl_algo.h:5456:5: note:   template
argument deduction/substitution failed:
t.cc:2:23: note:   candidate expects 3 arguments, 1 provided


[Bug c++/52974] New: Canonicalize include paths in diagnostics

2012-04-13 Thread redi at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=52974

 Bug #: 52974
   Summary: Canonicalize include paths in diagnostics
Classification: Unclassified
   Product: gcc
   Version: 4.7.0
Status: UNCONFIRMED
  Keywords: diagnostic
  Severity: normal
  Priority: P3
 Component: c++
AssignedTo: unassig...@gcc.gnu.org
ReportedBy: r...@gcc.gnu.org
CC: m...@gcc.gnu.org


#include 
void f() { std::sort(1); }

The diagnostics caused by misuse of the standard library are ridiculous:


t.cc: In function 'void f()':
t.cc:2:23: error: no matching function for call to 'sort(int)'
t.cc:2:23: note: candidates are:
In file included from
/home/redi/gcc/4.x/lib/gcc/x86_64-unknown-linux-gnu/4.8.0/../../../../include/c++/4.8.0/algorithm:63:0,
 from t.cc:1:
/home/redi/gcc/4.x/lib/gcc/x86_64-unknown-linux-gnu/4.8.0/../../../../include/c++/4.8.0/bits/stl_algo.h:5420:5:
note: template void std::sort(_RAIter, _RAIter)
/home/redi/gcc/4.x/lib/gcc/x86_64-unknown-linux-gnu/4.8.0/../../../../include/c++/4.8.0/bits/stl_algo.h:5420:5:
note:   template argument deduction/substitution failed:
t.cc:2:23: note:   candidate expects 2 arguments, 1 provided
In file included from
/home/redi/gcc/4.x/lib/gcc/x86_64-unknown-linux-gnu/4.8.0/../../../../include/c++/4.8.0/algorithm:63:0,
 from t.cc:1:
/home/redi/gcc/4.x/lib/gcc/x86_64-unknown-linux-gnu/4.8.0/../../../../include/c++/4.8.0/bits/stl_algo.h:5456:5:
note: template void std::sort(_RAIter, _RAIter,
_Compare)
/home/redi/gcc/4.x/lib/gcc/x86_64-unknown-linux-gnu/4.8.0/../../../../include/c++/4.8.0/bits/stl_algo.h:5456:5:
note:   template argument deduction/substitution failed:
t.cc:2:23: note:   candidate expects 3 arguments, 1 provided

Users don't care that the include path is
$PREFIX/lib/gcc/x86_64-unknown-linux-gnu/4.8.0/../../../../include/c++/4.8.0

The paths should be canonicalized using realpath(3) to simply
/home/redi/gcc/4.x/include/c++/4.8.0/algorithm and
/home/redi/gcc/4.x/include/c++/4.8.0/bits/stl_algo.h

This probably isn't a good idea for user headers, as the include path they use
with -I should be preserved so they recognise it, but for GCC's own C++ headers
(and possibly all system headers?) it would be a huge improvement.


[Bug c++/52841] [4.7/4.8 Regression] error: type 'Solvable' is not a base type for type 'Resolvable'

2012-04-13 Thread rguenth at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=52841

Richard Guenther  changed:

   What|Removed |Added

   Priority|P3  |P2


[Bug fortran/52864] [4.6/4.7/4.8 Regression] Assignment to pointer component for INTENT(IN) dummy argument

2012-04-13 Thread rguenth at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=52864

Richard Guenther  changed:

   What|Removed |Added

   Priority|P3  |P4


[Bug debug/52727] [4.7 Regression] internal compiler error at dwarf2cfi.c2:685

2012-04-13 Thread rguenth at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=52727

Richard Guenther  changed:

   What|Removed |Added

   Priority|P3  |P2
  Known to work||4.8.0
Summary|[4.7/4.8 Regression]|[4.7 Regression] internal
   |internal compiler error at  |compiler error at
   |dwarf2cfi.c2:685|dwarf2cfi.c2:685

--- Comment #16 from Richard Guenther  2012-04-13 
13:13:06 UTC ---
Fixed on trunk sofar.


[Bug tree-optimization/52633] [4.7/4.8 Regression] Compiler ICE in vect_is_simple_use_1 (ARM)

2012-04-13 Thread rguenth at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=52633

Richard Guenther  changed:

   What|Removed |Added

   Priority|P3  |P2
Summary|[4.7 Regression] Compiler   |[4.7/4.8 Regression]
   |ICE in vect_is_simple_use_1 |Compiler ICE in
   |(ARM)   |vect_is_simple_use_1 (ARM)

--- Comment #1 from Richard Guenther  2012-04-13 
13:10:40 UTC ---
I suppose also broken on trunk.


[Bug tree-optimization/52631] [4.6/4.7/4.8 Regression] VN does not use simplified expression for lookup

2012-04-13 Thread rguenth at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=52631

Richard Guenther  changed:

   What|Removed |Added

   Priority|P3  |P2
  Known to work||4.3.6

--- Comment #7 from Richard Guenther  2012-04-13 
13:10:04 UTC ---
That looks good apart from the use of valid_gimple_rhs_p which allows too much.
I'd rather use get_gimple_rhs_class (TREE_CODE (simplified)) and allow
GIMPLE_UNARY_RHS, GIMPLE_BINARY_RHS and GIMPLE_TERNARY_RHS here.


[Bug tree-optimization/52969] [4.7/4.8 Regression] ICE in in get_expr_operands, at tree-ssa-operands.c:1035 with -ftree-loop-if-convert-stores

2012-04-13 Thread vincenzo.innocente at cern dot ch
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=52969

--- Comment #11 from vincenzo Innocente  
2012-04-13 13:03:48 UTC ---
I do not have a clear case in hand with evidence of "double" compare
I will have a closer look to "real life" code.

btw 
I just noticed that your test case does not vectorize even if
I rewrite as
 for (; a ; ++j) 
   xsum[j] = (cluster[j] > 0.) ? 0. : cluster[j];

any idea why?

c++ -O3 -c ifconv.cc -ftree-loop-if-convert-stores -ftree-vectorizer-verbose=9

Analyzing loop at ifconv.cc:10

10: = analyze_loop_nest =
10: === vect_analyze_loop_form ===
10: not vectorized: control flow in loop.
10: bad loop form.
ifconv.cc:3: note: vectorized 0 loops in function.
pb-d-128-141-131-26:bugs48 innocent$ c++ -O3 -c ifconv.cc
-ftree-loop-if-convert-stores -ftree-vectorizer-verbose=9

Analyzing loop at ifconv.cc:10

10: = analyze_loop_nest =
10: === vect_analyze_loop_form ===
10: not vectorized: control flow in loop.
10: bad loop form.
ifconv.cc:3: note: vectorized 0 loops in function.
pb-d-128-141-131-26:bugs48 innocent$ c++ -Ofast -c ifconv.cc
-ftree-loop-if-convert-stores -ftree-vectorizer-verbose=9

Analyzing loop at ifconv.cc:10

10: = analyze_loop_nest =
10: === vect_analyze_loop_form ===
10: not vectorized: multiple exits.
10: bad loop form.
ifconv.cc:3: note: vectorized 0 loops in function.
pb-d-128-141-131-26:bugs48 innocent$ c++ -Ofast -c ifconv.cc 
-ftree-vectorizer-verbose=9

Analyzing loop at ifconv.cc:10

10: = analyze_loop_nest =
10: === vect_analyze_loop_form ===
10: not vectorized: multiple exits.
10: bad loop form.
ifconv.cc:3: note: vectorized 0 loops in function.


[Bug rtl-optimization/52573] [4.5/4.6/4.7/4.8 regression] regrename creates overlapping register allocations for output operands

2012-04-13 Thread bernds at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=52573

--- Comment #2 from Bernd Schmidt  2012-04-13 
13:02:03 UTC ---
 (expr_list:REG_DEAD (reg:SI 3 %d3 [236])
(expr_list:REG_UNUSED (reg:SI 3 %d3 [236])

The REG_DEAD note is bogus and confuses the renamer. Only REG_UNUSED should be
on this insn.


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

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

Richard Guenther  changed:

   What|Removed |Added

   Priority|P3  |P2


[Bug rtl-optimization/52573] [4.5/4.6/4.7/4.8 regression] regrename creates overlapping register allocations for output operands

2012-04-13 Thread rguenth at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=52573

Richard Guenther  changed:

   What|Removed |Added

   Priority|P3  |P2


[Bug target/52555] [4.6/4.7/4.8 Regression] ICE unrecognizable insn with -ffast-math and __attribute__((optimize(xx)))

2012-04-13 Thread rguenth at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=52555

Richard Guenther  changed:

   What|Removed |Added

   Priority|P3  |P2


  1   2   >