[Bug tree-optimization/59377] New: VRP produces bogus warning with -Warray-bounds

2013-12-03 Thread dnovillo at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=59377

Bug ID: 59377
   Summary: VRP produces bogus warning with -Warray-bounds
   Product: gcc
   Version: 4.8.0
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: tree-optimization
  Assignee: unassigned at gcc dot gnu.org
  Reporter: dnovillo at gcc dot gnu.org
  Host: x86_64-unknown-linux-gnu
Target: x86_64-unknown-linux-gnu
 Build: x86_64-unknown-linux-gnu

Using trunk and 4.8.x, this code produces a bogus -Warray-bounds warning:

typedef decltype(sizeof(void*)) size_t;

size_t strlen(const char *);
int memcmp (const void *, const void *, size_t);

struct StringPiece
{
   const char *ptr_;
   size_t size_;
   StringPiece ();
   StringPiece (const char *p1):ptr_ (p1), size_(strlen(p1)) { }
   const char *data () { return ptr_; }
   size_t length() { return size_; }
};


void operator== (StringPiece, StringPiece p2)
{
   const char *a = p2.data (), *b = a;
   if (p2.length()  8) {
 b += 8;
 memcmp (a, b, 1);
   }
}
void
UtilsSplitQuotedStrings ()
{
   StringPiece c;
   c == ;
}

$ trunk/bld/bin/g++ -std=c++11 -c -Warray-bounds -O2 a.cc
a.cc: In function ‘void UtilsSplitQuotedStrings()’:
a.cc:22:23: warning: array subscript is above array bounds [-Warray-bounds]
  memcmp (a, b, 1);
$  ^

The warning disappears with -fno-tree-vrp:

$ trunk/bld/bin/g++ -std=c++11 -c -Warray-bounds -O2 a.cc -fno-tree-vrp
$

I've seen some similar looking bug reports, but none seemed related with VRP.

[Bug middle-end/59212] [4.9 Regression] FAIL: g++.dg/plugin/selfassign.c compilation

2013-11-20 Thread dnovillo at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=59212

--- Comment #1 from Diego Novillo dnovillo at gcc dot gnu.org ---
Author: dnovillo
Date: Wed Nov 20 13:48:40 2013
New Revision: 205115

URL: http://gcc.gnu.org/viewcvs?rev=205115root=gccview=rev
Log:
PR 59212
* g++.dg/plugin/selfassign.c: Include stringpool.h

Modified:
trunk/gcc/testsuite/ChangeLog
trunk/gcc/testsuite/g++.dg/plugin/selfassign.c


[Bug middle-end/59212] [4.9 Regression] FAIL: g++.dg/plugin/selfassign.c compilation

2013-11-20 Thread dnovillo at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=59212

Diego Novillo dnovillo at gcc dot gnu.org changed:

   What|Removed |Added

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

--- Comment #2 from Diego Novillo dnovillo at gcc dot gnu.org ---
Fixed r205115.


[Bug bootstrap/54659] [4.8 Regression] Bootstrap with --disable-nls broken under Windows

2013-05-08 Thread dnovillo at gcc dot gnu.org


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=54659



Diego Novillo dnovillo at gcc dot gnu.org changed:



   What|Removed |Added



 Status|WAITING |RESOLVED

 Resolution||FIXED



--- Comment #29 from Diego Novillo dnovillo at gcc dot gnu.org 2013-05-08 
13:42:49 UTC ---

Fixed in gcc-4_8-branch at rev 198708 and trunk at rev 198711.


[Bug bootstrap/54659] [4.8 Regression] Bootstrap with --disable-nls broken under Windows

2013-05-07 Thread dnovillo at gcc dot gnu.org


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=54659



--- Comment #22 from Diego Novillo dnovillo at gcc dot gnu.org 2013-05-07 
15:07:54 UTC ---

Looking at this today.


[Bug bootstrap/54659] [4.8 Regression] Bootstrap with --disable-nls broken under Windows

2013-05-07 Thread dnovillo at gcc dot gnu.org


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=54659



Diego Novillo dnovillo at gcc dot gnu.org changed:



   What|Removed |Added



  Attachment #29020|0   |1

is obsolete||



--- Comment #23 from Diego Novillo dnovillo at gcc dot gnu.org 2013-05-07 
16:55:07 UTC ---

Created attachment 30046

  -- http://gcc.gnu.org/bugzilla/attachment.cgi?id=30046

Proposed fix.  Revert trunk commit r190487


[Bug bootstrap/54659] [4.8 Regression] Bootstrap with --disable-nls broken under Windows

2013-05-07 Thread dnovillo at gcc dot gnu.org


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=54659



Diego Novillo dnovillo at gcc dot gnu.org changed:



   What|Removed |Added



 Status|REOPENED|WAITING



--- Comment #24 from Diego Novillo dnovillo at gcc dot gnu.org 2013-05-07 
16:56:49 UTC ---

The patch I just attached reverts the commit that caused this problem, but I am

unable to test it properly. I need help with:



1- Making sure this reversal does not re-introduce

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=54281

2- Testing it on MinGW.  I have no access to this system.


[Bug bootstrap/54659] [4.8 Regression] Bootstrap with --disable-nls broken under Windows

2013-03-26 Thread dnovillo at gcc dot gnu.org


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=54659



--- Comment #18 from Diego Novillo dnovillo at gcc dot gnu.org 2013-03-26 
10:48:18 UTC ---

Sure.  But I'm not quite sure which change you are referring to.  I see 2

related patches (well, 3 but one is the reversal of the first one).  I suppose

we are referring to rev 190487?



commit 4b9beb88f5d49452a1fb25826c00cd81b7461b04

Author: dnovillo dnovillo@138bc75d-0d04-0410-961f-82ee72b054a4

Date:   Fri Aug 17 15:37:57 2012 +



2012-08-17  Diego Novillo  dnovi...@google.com



PR bootstrap/54281

* configure.ac: Add libintl.h to AC_CHECK_HEADERS list.

* config.in: Regenerate.

* configure: Regenerate.

* intl.h: Always include libintl.h if HAVE_LIBINTL_H is

set.git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@190487

138bc75d-0d04-0410-961f-82ee72b054a4



commit 2a02178fdd2f016404c835abe988c427207b3f5aAuthor: dnovillo

dnovillo@138bc75d-0d04-0410-961f-82ee72b054a4

Date:   Thu Aug 16 18:24:22 2012 +



2012-08-16   Diego Novillo  dnovi...@google.com



Revert

PR bootstrap/54281

* double-int.h: Move including of gmp.h ...* system.h: ...

here.

* realmpfr.h: Do not include gmp.h.

* tree-ssa-loop-niter.c: Do not include gmp.h.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@190449

138bc75d-0d04-0410-961f-82ee72b054a4



commit f5d9dd2ea4fdacef34156ebc853cfeba4e6f301c

Author: dnovillo dnovillo@138bc75d-0d04-0410-961f-82ee72b054a4

Date:   Thu Aug 16 13:28:13 2012 +



2012-08-16  Diego Novillo  dnovi...@google.com



PR bootstrap/54281

* double-int.h: Move including of gmp.h ...

* system.h: ... here.* realmpfr.h: Do not include gmp.h.

* tree-ssa-loop-niter.c: Do not include gmp.h.



fortran/ChangeLog

* gfortran.h: Do not include gmp.h.



git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@190444

138bc75d-0d04-0410-961f-82ee72b054a4


[Bug bootstrap/54659] [4.8 Regression] Bootstrap with --disable-nls broken under Windows

2013-03-25 Thread dnovillo at gcc dot gnu.org


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=54659



Diego Novillo dnovillo at gcc dot gnu.org changed:



   What|Removed |Added



 Status|RESOLVED|REOPENED

 Resolution|FIXED   |



--- Comment #16 from Diego Novillo dnovillo at gcc dot gnu.org 2013-03-25 
22:18:06 UTC ---

Re-opening on request from Roland.


[Bug rtl-optimization/56348] New: internal compiler error in assign_by_spills with -m32 -fPIC -msse2

2013-02-15 Thread dnovillo at gcc dot gnu.org


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=56348



 Bug #: 56348

   Summary: internal compiler error in assign_by_spills with -m32

-fPIC -msse2

Classification: Unclassified

   Product: gcc

   Version: 4.8.0

Status: UNCONFIRMED

  Severity: normal

  Priority: P3

 Component: rtl-optimization

AssignedTo: unassig...@gcc.gnu.org

ReportedBy: dnovi...@gcc.gnu.org

CC: vmaka...@redhat.com

  Host: x86_64-unknown-linux-gnu

Target: x86_64-unknown-linux-gnu

 Build: x86_64-unknown-linux-gnu





With trunk at rev 195930 I am running into the following ICE while building

SuiteSparse v3.4.0 (http://www.cise.ufl.edu/research/sparse/SuiteSparse/) with

-m32 and -fPIC.



Reduced test case:

+ ./cc1 min.c -quiet -m32 -O2 -fPIC -mfpmath=sse -msse2

min.c: In function 'cholmod_l_drop':

min.c:34:1: internal compiler error: in assign_by_spills, at lra-assigns.c:1262

 }

 ^

0x7f0c54 assign_by_spills

gcc/lra-assigns.c:1262

0x7f1c53 lra_assign()

gcc/lra-assigns.c:1419

0x7ed914 lra(_IO_FILE*)

gcc/lra.c:2307

0x7b41e0 do_reload

gcc/ira.c:4614

0x7b41e0 rest_of_handle_reload

gcc/ira.c:4726

Please submit a full bug report,

with preprocessed source if appropriate.

Please include the complete backtrace with any bug report.

See http://gcc.gnu.org/bugs.html for instructions.



$ cat min.c

typedef unsigned int size_t;



extern double fabs (double __x) __attribute__ ((__nothrow__, __leaf__))

  __attribute__ ((__const__));



typedef struct cholmod_sparse_struct

{

  size_t ncol;

  void *p;

} cholmod_sparse;



int cholmod_l_reallocate_sparse (size_t, cholmod_sparse *, void *);



int

cholmod_l_drop (double tol, cholmod_sparse * A)

{

  double aij;

  double *Ax;

  long long *Ap, *Ai, *Anz;

  long long packed, i, j, nrow, ncol, p, pend, nz, values;

  Ap = A-p;

  ncol = A-ncol;

  nz = 0;

  for (j = 0; j  ncol; j++)

for (; p  pend; p++)

  {

i = Ai[p];

aij = Ax[p];

if (i = j  (fabs (aij)  tol || ((aij) != (aij

  nz++;

  }

  Ap[ncol] = nz;

  cholmod_l_reallocate_sparse (nz, A, 0);

}


[Bug fortran/56224] New: gfortran -fopenmp cannot find omp_lib.h

2013-02-06 Thread dnovillo at gcc dot gnu.org

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=56224

 Bug #: 56224
   Summary: gfortran -fopenmp cannot find omp_lib.h
Classification: Unclassified
   Product: gcc
   Version: 4.8.0
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: fortran
AssignedTo: unassig...@gcc.gnu.org
ReportedBy: dnovi...@gcc.gnu.org
CC: ja...@redhat.com


$ cat ~/a.f
include omp_lib.h
end

Compiled with trunk as of 2013-02-04:

$ gcc48/bin/gfortran -c a.f
a.f:1: Error: Can't open included file 'omp_lib.h'

Compiled with GCC 4.7:

$ gcc47/bin/gfortran -c a.f
$

Jakub and I discussed this on IRC:

07:58:20 dnovillo: jakub: i see the file in …./finclude/omp_lib.h, but when i
run the libgomp testsuite with the installed compiler, the #include directives
in the libgomp fortran tests can't find that file.
07:58:22 jakub: dnovillo: it is; omp_lib.h generally should be #included, so
what matters is the standard preprocessor search path, and omp_lib.h should be
there
07:58:41 richi: maybe I should code up a discover undetected loops routine
07:58:51 jakub: dnovillo: omp_lib without .h should be USEd
07:59:18 dnovillo: jakub: this is being included by
libgomp.fortran/appendix-a/a.18.1.f90
08:00:08 dnovillo: the problem is that when i run the testsuite standalone, I
don't see a -I to the .../finclude directory.  This works when executed from
the build directory, so I may be missing some settings in my dejagnusetup.
08:00:17 jakub: dnovillo: finclude/ is for modules I thought
08:00:41 dnovillo: well, that's where the file ends up in the installed image.
08:00:54 dnovillo: fortran modules have a different search path?
08:02:22 jakub:   include omp_lib.h
08:02:22 jakub:   end
08:02:33 jakub: gfortran -fopenmp -o /tmp/a /tmp/a.f
08:02:46 jakub: works just fine for me with installed compiler (Fedora 17 one)
08:04:10 dnovillo: hmm, there may be another wrinkle here then.  i'm getting
08:04:26 dnovillo: $ bin/gfortran -fopenmp -o /tmp/a.o ~/a.f
/home/dnovillo/a.f:1: Error: Can't open included file 'omp_lib.h'
08:04:50 dnovillo: with gfortran from trunk as of 4/Feb.
08:05:02 jakub: even
08:05:08 jakub: #include omp_lib.h
08:05:11 jakub:   end
08:05:21 jakub: gfortran -fopenmp -o /tmp/a /tmp/a.F works for me
08:05:32 dnovillo: with trunk gfortran, i suppose?
08:05:51 jakub: dnovillo 4.7, but there weren't any changes I'm aware of
08:06:00 jakub: dnovillo: let me try 4.8-RH gfortran
08:06:01 dnovillo: ah, 4.7 works fine for me.
08:06:15 dnovillo: it's 4.8 that i can't get to work.
08:09:01 jakub: dnovillo: ok, I can reproduce the problem with 4.8
08:09:35 dnovillo: i think using USE might work. I see -fintrinsic-modules-path
gcc/x86/bin/../lib/gcc/x86_64-grtev3-linux-gnu/4.8.x-google-integration/finclude
in the -v output
08:09:39 jakub: dnovillo: can you file a bug against fortran component?  The
files are installed the same way as before, so it is the FE that changed in
some weirdo way
08:09:48 dnovillo: jakub: will do.
08:09:56 jakub: dnovillo: use should be used together with omp_lib, not
omp_lib.h
08:10:23 dnovillo: ah, so the test would have to change.  ok.  i'll file the
bug and mark these failures as expected for now in our builds.  thanks.
08:10:38 jakub: dnovillo: perhaps the end of dicsussion will be that omp_lib.h
should be installed into include/ instead of finclude/, where it would
supposedly work
08:11:05 jakub: dnovillo: even in 4.7, gfortran -E with #include omp_lib.h
didn't work, but -c worked
08:11:30 dnovillo: heh.  but we'd need it in both places, right?  finclude/ is
used for USE commands?
08:11:38 jakub: dnovillo: having omp_lib.h in include/ on the other side means
that people using C/C++ might try to #include omp_lib.h and be very surprised
08:12:15 jakub: dnovillo: omp_lib.h isn't a module, it is a header file, it
should be used in pre-F90 Fortran only
08:12:30 dnovillo: ah
08:12:38 jakub: dnovillo: USE is F90+, needs omp_lib.f90/omp_lib.mod etc. -
i.e. a module


[Bug rtl-optimization/56225] New: ICE in lra-constraints.c when executing the testsuite with -m32 -march=pentium3

2013-02-06 Thread dnovillo at gcc dot gnu.org


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=56225



 Bug #: 56225

   Summary: ICE in lra-constraints.c when executing the testsuite

with -m32 -march=pentium3

Classification: Unclassified

   Product: gcc

   Version: 4.8.0

Status: UNCONFIRMED

  Severity: normal

  Priority: P3

 Component: rtl-optimization

AssignedTo: unassig...@gcc.gnu.org

ReportedBy: dnovi...@gcc.gnu.org

CC: vmaka...@redhat.com

Target: x86_64-unknown-linux-gnu





I'm getting several failures when running the testsuite with -m32

-march=pentium3.  They all seem related.  I've taken this one from

gcc.c-torture/execute/scal-to-vec2.c



$ cat scal-to-vec2.i

long __attribute__ ((noinline)) vlng () { return (long)42; }

int __attribute__ ((noinline)) vint () { return (int) 43; }

short __attribute__ ((noinline)) vsrt () { return (short)42; }

char __attribute__ ((noinline)) vchr () { return (char)42; }





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

__attribute__((vector_size((16)*sizeof(char char c0 = {argc,

1,2,3,4,5,6,7, argc, 1,2,3,4,5,6,7};

__attribute__((vector_size((16)*sizeof(char char c1;



__attribute__((vector_size((8)*sizeof(short short s0 = {argc,

1,2,3,4,5,6,7};

__attribute__((vector_size((8)*sizeof(short short s1;



__attribute__((vector_size((4)*sizeof(int int i0 = {argc, 1, 2, 3};

__attribute__((vector_size((4)*sizeof(int int i1;



__attribute__((vector_size((2)*sizeof(long long l0 = {argc, 1};

__attribute__((vector_size((2)*sizeof(long long l1;



c1 = vchr() + c0; do { int __i; for (__i = 0; __i  16; __i++) { if

((*((char *) (c1) + __i)) != (vchr() + (*((char *) (c0) + __i

__builtin_abort (); }} while (0);



s1 = vsrt() + s0; do { int __i; for (__i = 0; __i  8; __i++) { if

((*((short *) (s1) + __i)) != (vsrt() + (*((short *) (s0) + __i

__builtin_abort (); }} while (0);

s1 = vchr() + s0; do { int __i; for (__i = 0; __i  8; __i++) { if

((*((short *) (s1) + __i)) != (vchr() + (*((short *) (s0) + __i

__builtin_abort (); }} while (0);



i1 = vint() * i0; do { int __i; for (__i = 0; __i  4; __i++) { if ((*((int

*) (i1) + __i)) != (vint() * (*((int *) (i0) + __i __builtin_abort (); }}

while (0);

i1 = vsrt() * i0; do { int __i; for (__i = 0; __i  4; __i++) { if ((*((int

*) (i1) + __i)) != (vsrt() * (*((int *) (i0) + __i __builtin_abort (); }}

while (0);

i1 = vchr() * i0; do { int __i; for (__i = 0; __i  4; __i++) { if ((*((int

*) (i1) + __i)) != (vchr() * (*((int *) (i0) + __i __builtin_abort (); }}

while (0);



l1 = vlng() * l0; do { int __i; for (__i = 0; __i  2; __i++) { if

((*((long *) (l1) + __i)) != (vlng() * (*((long *) (l0) + __i

__builtin_abort (); }} while (0);

l1 = vint() * l0; do { int __i; for (__i = 0; __i  2; __i++) { if

((*((long *) (l1) + __i)) != (vint() * (*((long *) (l0) + __i

__builtin_abort (); }} while (0);

l1 = vsrt() * l0; do { int __i; for (__i = 0; __i  2; __i++) { if

((*((long *) (l1) + __i)) != (vsrt() * (*((long *) (l0) + __i

__builtin_abort (); }} while (0);

l1 = vchr() * l0; do { int __i; for (__i = 0; __i  2; __i++) { if

((*((long *) (l1) + __i)) != (vchr() * (*((long *) (l0) + __i

__builtin_abort (); }} while (0);



return 0;

}



When compiled with -m32, it works fine:

$ ../cc1 -fpreprocessed scal-to-vec2.i -quiet -dumpbase scal-to-vec2.c

-mtune=generic -auxbase scal-to-vec2 -O1 -w -version

-fno-diagnostics-show-caret -o scal-to-vec2.s -quiet -m32

GNU C (GCC) version 4.8.x-google-integration 20130201 (experimental)

(x86_64-unknown-linux-gnu)

compiled by GNU C version 4.8.x-google-integration 20130201

(experimental), GMP version 5.0.2, MPFR version 3.1.0-p3, MPC version 0.9

GGC heuristics: --param ggc-min-expand=30 --param ggc-min-heapsize=4096

GNU C (GCC) version 4.8.x-google-integration 20130201 (experimental)

(x86_64-unknown-linux-gnu)

compiled by GNU C version 4.8.x-google-integration 20130201

(experimental), GMP version 5.0.2, MPFR version 3.1.0-p3, MPC version 0.9

GGC heuristics: --param ggc-min-expand=30 --param ggc-min-heapsize=4096

Compiler executable checksum: 261028b85770ed5f451425c66cb11710



But when compiled with -m32 -march=pentium3, it fails with:

$ ../cc1 -fpreprocessed scal-to-vec2.i -quiet -dumpbase scal-to-vec2.c

-mtune=generic -auxbase scal-to-vec2 -O1 -w -version

-fno-diagnostics-show-caret -o scal-to-vec2.s -quiet -m32 -march=pentium3

GNU C (GCC) version 4.8.x-google-integration 20130201 (experimental)

(x86_64-unknown-linux-gnu)

compiled by GNU C version 4.8.x-google-integration 20130201

(experimental), GMP version 5.0.2, MPFR version 3.1.0-p3, MPC version 0.9

GGC heuristics: --param ggc-min-expand=30 --param ggc-min-heapsize=4096

GNU C (GCC) version 4.8.x-google-integration 20130201 

[Bug bootstrap/55792] [4.8 Regression] Bad memory access with profiledbootstrap and LTO

2013-01-07 Thread dnovillo at gcc dot gnu.org


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=55792



--- Comment #11 from Diego Novillo dnovillo at gcc dot gnu.org 2013-01-07 
17:54:14 UTC ---

(In reply to comment #9)

 Eh.  Diego, how does GTY((user)) work here?  It smells like a bug in vec.h

 to me.

 

 /* Garbage collection support for vecT, A, vl_embed.  */

 

 templatetypename T

 void

 gt_ggc_mx (vecT, va_gc *v)

 {

   extern void gt_ggc_mx (T );

   for (unsigned i = 0; i  v-length (); i++)

 gt_ggc_mx ((*v)[i]);

 }

 

 doesn't it need to mark the vec itself?  Maybe automatic registration of

 roots (this is a GC root) does not work with GTY((user))?



No.  The root is/should be marked by the code calling gt_ggc_mx.  gengtype will

generate code like:



  if (ggc_test_and_set_mark (x))

{

  gt_ggc_mx (x);

}



ggc_test_and_set_mark() is the one that marks the root.  Has gengtype generated

a function for this global?  It should be something like this



void

gt_ggc_mx_vec_mangled_type_name (void *x_p)

{

  vectype_name,va_gc * const x = (vectype_name,va_gc *)x_p;

  if (ggc_test_and_set_mark (x))

{

  gt_ggc_mx (x);

}

}


[Bug c++/55742] __attribute__ in class function declaration cause prototype does not match errors.

2012-12-20 Thread dnovillo at gcc dot gnu.org


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=55742



Diego Novillo dnovillo at gcc dot gnu.org changed:



   What|Removed |Added



 CC||jason at gcc dot gnu.org



--- Comment #2 from Diego Novillo dnovillo at gcc dot gnu.org 2012-12-20 
17:59:47 UTC ---

After thinking about this more, I think the problem here is that the attributes

specified in the declaration of the function are not being used in the function

definition.



Jason, shouldn't the attributes specified in the function declaration be

sufficient?  Or does the user really need to apply attributes to both the

declaration and the definition?





Thanks.


[Bug c++/55768] New: Use of unknown __attribute__ in function definition is flagged with an error

2012-12-20 Thread dnovillo at gcc dot gnu.org


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=55768



 Bug #: 55768

   Summary: Use of unknown __attribute__ in function definition is

flagged with an error

Classification: Unclassified

   Product: gcc

   Version: 4.8.0

Status: UNCONFIRMED

  Severity: normal

  Priority: P3

 Component: c++

AssignedTo: unassig...@gcc.gnu.org

ReportedBy: dnovi...@gcc.gnu.org

CC: ja...@gcc.gnu.org





I am not sure whether this is a bug, but it is a behaviour change since 4.7.



The compiler usually rejects attributes applied to function definitions:



int foo(int x, int y) __attribute__((const))

{

  return x * y;

}

$ gcc47 -c a.cc

a.cc:1:23: error: attributes are not allowed on a function-definition

$



But if the compiler does not recognize the attribute, then it says nothing:



int foo(int x, int y) __attribute__((no_thread_safety_analysis))

{

  return x * y;

}

$ gcc47 -c a.cc

$



This has changed in 4.8.  We now emit an error even if we do not understand the

attribute:



a.cc:1:23: error: attributes are not allowed on a function-definition

 int foo(int x, int y) __attribute__((no_thread_safety_analysis))

   ^



Is this a case where the user code should be changed to accomodate the rule of

not allowing attributes on function definitions?



In fact, shouldn't the compiler just allow attributes on function definitions?


[Bug c++/55742] New: __attribute__ in class function declaration cause prototype does not match errors.

2012-12-19 Thread dnovillo at gcc dot gnu.org


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=55742



 Bug #: 55742

   Summary: __attribute__ in class function declaration cause

prototype does not match errors.

Classification: Unclassified

   Product: gcc

   Version: 4.8.0

Status: UNCONFIRMED

  Severity: normal

  Priority: P3

 Component: c++

AssignedTo: unassig...@gcc.gnu.org

ReportedBy: dnovi...@gcc.gnu.org

CC: tmsri...@google.com

  Host: x86_64-unknown-linux-gnu

Target: x86_64-unknown-linux-gnu

 Build: x86_64-unknown-linux-gnu





The following code used to compile with GCC 4.7.  It fails on trunk with:



$ bld/xgcc -Bbld/ -c a.cc

a.cc:10:6: error: prototype for 'void A::E(uint64*, uint64*, const void*,

int64) const' does not match any in class 'A'

 void A::E(uint64 *l, uint64 *h, const void *b, int64 g) const

  ^

a.cc:6:18: error: candidate is: virtual void A::E(uint64*, uint64*, const

void*, int64) const

 virtual void E(uint64 *l, uint64 *h, const void *b, int64 g) const





typedef unsigned long long uint64;

typedef long long int64;



class A {

  public:

virtual void E(uint64 *l, uint64 *h, const void *b, int64 g) const

__attribute__ ((__target__ (sse4)));

};



void A::E(uint64 *l, uint64 *h, const void *b, int64 g) const

{

*l = *h + g;

if (b) return;

}



This seems to be a bug in the multiversioning logic.  We fail to match the

function to its declaration in decl2.c:check_classfn because

ix86_function_versions returns true.



676

677   /* While finding a match, same types and params are not

enough

678  if the function is versioned.  Also check version

(target)

679  attributes.  */

680   if (same_type_p (TREE_TYPE (TREE_TYPE (function)),

681TREE_TYPE (TREE_TYPE (fndecl)))

682compparms (p1, p2)

683!targetm.target_option.function_versions (function,

fndecl)

684(!is_template

685   || comp_template_parms (template_parms,

686   DECL_TEMPLATE_PARMS

(fndecl)))

687(DECL_TEMPLATE_SPECIALIZATION (function)

688   == DECL_TEMPLATE_SPECIALIZATION (fndecl))

689(!DECL_TEMPLATE_SPECIALIZATION (function)

690   || (DECL_TI_TEMPLATE (function)

691   == DECL_TI_TEMPLATE (fndecl

692 break;



While this agrees with the logic of the multiversion test, it is not the

appropriate context to be checking for multiversions, I think.



Here we are comparing a function *declaration* with a function *definition*. 

The function definition can never have attributes (only declarations do).  So I

*think* the right fix here is to not call the multiversion hook.



Sri, could you take a look?  This bug is causing build failures with our

internal code base.





Thanks.


[Bug c++/55245] [4.6/4.7/4.8 Regression] Compiler segfault when compiling a small test case

2012-11-26 Thread dnovillo at gcc dot gnu.org


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=55245



--- Comment #7 from Diego Novillo dnovillo at gcc dot gnu.org 2012-11-26 
18:35:43 UTC ---

Author: dnovillo

Date: Mon Nov 26 18:35:38 2012

New Revision: 193825



URL: http://gcc.gnu.org/viewcvs?root=gccview=revrev=193825

Log:

Google ref b/7500842.



2012-11-26  Diego Novillo  dnovi...@google.com



* gimplify.c: Work around for PR 55245.



testsuite/ChangeLog.google-integration

* g++.dg/pr55245.C: New.







Added:

branches/google/gcc-4_7/gcc/testsuite/g++.dg/pr55245.C

Modified:

branches/google/gcc-4_7/gcc/ChangeLog.google-4_7

branches/google/gcc-4_7/gcc/gimplify.c

branches/google/gcc-4_7/gcc/testsuite/ChangeLog.google-4_7


[Bug bootstrap/55387] [4.8 Regression] Build problem: malloc error in genautomata

2012-11-20 Thread dnovillo at gcc dot gnu.org


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=55387



Diego Novillo dnovillo at gcc dot gnu.org changed:



   What|Removed |Added



 CC||dnovillo at gcc dot gnu.org



--- Comment #3 from Diego Novillo dnovillo at gcc dot gnu.org 2012-11-20 
14:10:43 UTC ---

Can you show me the value of equiv_classes at frame #6? (inside minimize_DFA)

and frame #4?  (inside copy_equiv_class).  In both cases, it should be

{

  _vec = 0x0;

}



If not, then there is a problem with the initializer of equiv_classes in

minimize_DFA.


[Bug middle-end/55398] [4.8 Regression] va_arg usage with non-POD

2012-11-20 Thread dnovillo at gcc dot gnu.org


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=55398



Diego Novillo dnovillo at gcc dot gnu.org changed:



   What|Removed |Added



 CC||dnovillo at gcc dot gnu.org

 AssignedTo|unassigned at gcc dot   |dnovillo at gcc dot gnu.org

   |gnu.org |



--- Comment #7 from Diego Novillo dnovillo at gcc dot gnu.org 2012-11-20 
14:12:43 UTC ---

Fixing.


[Bug middle-end/55398] [4.8 Regression] va_arg usage with non-POD

2012-11-20 Thread dnovillo at gcc dot gnu.org


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=55398



--- Comment #8 from Diego Novillo dnovillo at gcc dot gnu.org 2012-11-20 
16:26:24 UTC ---

Author: dnovillo

Date: Tue Nov 20 16:26:09 2012

New Revision: 193667



URL: http://gcc.gnu.org/viewcvs?root=gccview=revrev=193667

Log:

Convert vec into a POD.



This fixes PR 55398 by making vec a true POD.  I thought we could get

away with having private fields, but we can't.  We fail to pass vec

instances through varargs.



The patch makes every field public and mangles the field names in the

hope that no future patch will try to make use of them directly.  It's

horrible, but I could not think of anything better.



Tested with clang++ as the host compiler.



2012-11-20  Diego Novillo  dnovi...@google.com



PR middle-end/55398

* vec.h (class vec_prefix): Make every field public.

Rename field alloc_ to alloc_PRIVATE_.

Rename field num_ to num_PRIVATE_.

Update all users.

(class vecT, A, vl_embed): Make every field public.

Rename field pfx_ to pfx_PRIVATE_.

Rename field data_ to data_PRIVATE_.

Update all users.

(class vecT, A, vl_ptr): Make every field public.

Rename field vec_ to vec_PRIVATE_.

Update all users.



Modified:

trunk/gcc/ChangeLog

trunk/gcc/vec.c

trunk/gcc/vec.h


[Bug middle-end/55398] [4.8 Regression] va_arg usage with non-POD

2012-11-20 Thread dnovillo at gcc dot gnu.org


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=55398



Diego Novillo dnovillo at gcc dot gnu.org changed:



   What|Removed |Added



 Status|NEW |RESOLVED

 Resolution||FIXED



--- Comment #9 from Diego Novillo dnovillo at gcc dot gnu.org 2012-11-20 
16:30:14 UTC ---

Fixed.


[Bug middle-end/55381] [4.8 Regression]: build fails on cris-elf building libgfortran with host-gcc-4.4, ICE compiling matmul_i1.c

2012-11-20 Thread dnovillo at gcc dot gnu.org


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=55381



--- Comment #8 from Diego Novillo dnovillo at gcc dot gnu.org 2012-11-20 
16:50:00 UTC ---

I don't have access to old compilers locally.  I'm trying with a cross from one

of the sparc boxes in the farm that has gcc 4.3.2.


[Bug c++/55245] [4.6/4.7/4.8 Regression] Compiler segfault when compiling a small test case

2012-11-20 Thread dnovillo at gcc dot gnu.org


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=55245



Diego Novillo dnovillo at gcc dot gnu.org changed:



   What|Removed |Added



 CC||dnovillo at gcc dot gnu.org



--- Comment #4 from Diego Novillo dnovillo at gcc dot gnu.org 2012-11-21 
00:52:57 UTC ---

David's analysis is correct.  The type of the element at the point of the

failure is not a complete type.



At this point, I think all the types should've been completed, so I'm not sure

why this one still isn't.  Jason, this patchlet (which is very likely papering

over the issue) allows the file to build.



Index: gimplify.c

===

--- gimplify.c  (revision 193508)

+++ gimplify.c  (working copy)

@@ -2123,6 +2123,8 @@

  if (TREE_OPERAND (t, 3) == NULL_TREE)

{ 

  tree elmt_type = TREE_TYPE (TREE_TYPE (TREE_OPERAND (t, 0)));

+ if (!COMPLETE_TYPE_P (elmt_type))

+   layout_type (elmt_type);

  tree elmt_size = unshare_expr (array_ref_element_size (t));

  tree factor = size_int (TYPE_ALIGN_UNIT (elmt_type));



In this case, we have



t == mosaic_position[tri]

elmt_type == struct Vector2_f[3], but we cannot compute its element size

because it has not yet been laid out.



Jason, what would be a better place to make sure the type is laid out?





Thanks.  Diego.


[Bug target/54658] vxworks.c / macro 'VEC_quick_ push': no matching function for call

2012-09-21 Thread dnovillo at gcc dot gnu.org


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=54658



Diego Novillo dnovillo at gcc dot gnu.org changed:



   What|Removed |Added



 Status|UNCONFIRMED |RESOLVED

 Resolution||DUPLICATE



--- Comment #1 from Diego Novillo dnovillo at gcc dot gnu.org 2012-09-21 
16:21:08 UTC ---

I fixed this yesterday.



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


[Bug target/54631] vxworks.c fails to compile

2012-09-21 Thread dnovillo at gcc dot gnu.org


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=54631



Diego Novillo dnovillo at gcc dot gnu.org changed:



   What|Removed |Added



 CC||amylaar at gcc dot gnu.org



--- Comment #5 from Diego Novillo dnovillo at gcc dot gnu.org 2012-09-21 
16:21:08 UTC ---

*** Bug 54658 has been marked as a duplicate of this bug. ***


[Bug target/54631] vxworks.c fails to compile

2012-09-20 Thread dnovillo at gcc dot gnu.org


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=54631



Diego Novillo dnovillo at gcc dot gnu.org changed:



   What|Removed |Added



 Status|UNCONFIRMED |ASSIGNED

   Last reconfirmed||2012-09-20

 AssignedTo|unassigned at gcc dot   |dnovillo at gcc dot gnu.org

   |gnu.org |

 Ever Confirmed|0   |1



--- Comment #1 from Diego Novillo dnovillo at gcc dot gnu.org 2012-09-20 
15:31:19 UTC ---

Testing fix.


[Bug target/54631] vxworks.c fails to compile

2012-09-20 Thread dnovillo at gcc dot gnu.org


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=54631



--- Comment #2 from Diego Novillo dnovillo at gcc dot gnu.org 2012-09-20 
16:31:12 UTC ---

Author: dnovillo

Date: Thu Sep 20 16:31:05 2012

New Revision: 191574



URL: http://gcc.gnu.org/viewcvs?root=gccview=revrev=191574

Log:

PR target/54631

* config/vxworks.c (vxworks_emutls_var_init): Update for new

VEC_quick_push interface.



Modified:

trunk/gcc/ChangeLog

trunk/gcc/config/vxworks.c


[Bug target/54631] vxworks.c fails to compile

2012-09-20 Thread dnovillo at gcc dot gnu.org


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=54631



--- Comment #3 from Diego Novillo dnovillo at gcc dot gnu.org 2012-09-20 
17:58:34 UTC ---

Should be fixed in trunk.  Robert, could you please double check?



Thanks.


[Bug bootstrap/54484] r190927 breaks bootstrap with clang compiler

2012-09-05 Thread dnovillo at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=54484

--- Comment #7 from Diego Novillo dnovillo at gcc dot gnu.org 2012-09-05 
16:34:54 UTC ---
Author: dnovillo
Date: Wed Sep  5 16:34:42 2012
New Revision: 190988

URL: http://gcc.gnu.org/viewcvs?root=gccview=revrev=190988
Log:
PR bootstrap/54484
* vec.h (vec_t::lower_bound): Fix spelling of LESSTHAN
argument.

Modified:
trunk/gcc/ChangeLog
trunk/gcc/vec.h


[Bug bootstrap/54479] Bootstrap with release-checking broken

2012-09-04 Thread dnovillo at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=54479

Diego Novillo dnovillo at gcc dot gnu.org changed:

   What|Removed |Added

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

--- Comment #1 from Diego Novillo dnovillo at gcc dot gnu.org 2012-09-04 
15:12:41 UTC ---
Reproduced.  Fixing.


[Bug bootstrap/54479] Bootstrap with release-checking broken

2012-09-04 Thread dnovillo at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=54479

--- Comment #2 from Diego Novillo dnovillo at gcc dot gnu.org 2012-09-04 
15:17:00 UTC ---
Author: dnovillo
Date: Tue Sep  4 15:16:51 2012
New Revision: 190937

URL: http://gcc.gnu.org/viewcvs?root=gccview=revrev=190937
Log:
PR bootstrap/54479
* vec.h (vec_t::copy): Add cast in call to reserve_exact.

Modified:
trunk/gcc/ChangeLog
trunk/gcc/vec.h


[Bug bootstrap/54479] Bootstrap with release-checking broken

2012-09-04 Thread dnovillo at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=54479

Diego Novillo dnovillo at gcc dot gnu.org changed:

   What|Removed |Added

 Status|ASSIGNED|RESOLVED
 Resolution||FIXED

--- Comment #3 from Diego Novillo dnovillo at gcc dot gnu.org 2012-09-04 
15:18:50 UTC ---
Fixed.


[Bug bootstrap/54478] [4.8 Regression] Fails to bootstrap with GCC 4.3.6

2012-09-04 Thread dnovillo at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=54478

Diego Novillo dnovillo at gcc dot gnu.org changed:

   What|Removed |Added

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

--- Comment #3 from Diego Novillo dnovillo at gcc dot gnu.org 2012-09-04 
16:04:04 UTC ---
Working on a fix.


[Bug bootstrap/54478] [4.8 Regression] Fails to bootstrap with GCC 4.3.6

2012-09-04 Thread dnovillo at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=54478

--- Comment #4 from Diego Novillo dnovillo at gcc dot gnu.org 2012-09-04 
18:33:34 UTC ---
Author: dnovillo
Date: Tue Sep  4 18:33:29 2012
New Revision: 190943

URL: http://gcc.gnu.org/viewcvs?root=gccview=revrev=190943
Log:
This patch works around a parsing problem with g++ 4.3.  The parser is
failing to lookup calls to the template function reserve when called
from other member functions:

vec_tT::reserveA (...)

The parser thinks that the '' in reserveA is a less-than operation.
This problem does not happen after 4.3.

This code is going to change significantly, so this won't be needed
soon.

Tested on x86_64 with g++ 4.3 and g++ 4.6.

PR bootstrap/54478
* vec.h (vec_t::alloc): Remove explicit type specification
in call to reserve.
(vec_t::copy): Likewise.
(vec_t::reserve): Likewise.
(vec_t::reserve_exact): Likewise.
(vec_t::safe_splice): Likewise.
(vec_t::safe_push): Likewise.
(vec_t::safe_grow): Likewise.
(vec_t::safe_grow_cleared): Likewise.
(vec_t::safe_insert): Likewise.

Modified:
trunk/gcc/ChangeLog
trunk/gcc/vec.h


[Bug bootstrap/54478] [4.8 Regression] Fails to bootstrap with GCC 4.3.6

2012-09-04 Thread dnovillo at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=54478

Diego Novillo dnovillo at gcc dot gnu.org changed:

   What|Removed |Added

 Status|ASSIGNED|RESOLVED
 Resolution||FIXED

--- Comment #4 from Diego Novillo dnovillo at gcc dot gnu.org 2012-09-04 
18:33:34 UTC ---
Author: dnovillo
Date: Tue Sep  4 18:33:29 2012
New Revision: 190943

URL: http://gcc.gnu.org/viewcvs?root=gccview=revrev=190943
Log:
This patch works around a parsing problem with g++ 4.3.  The parser is
failing to lookup calls to the template function reserve when called
from other member functions:

vec_tT::reserveA (...)

The parser thinks that the '' in reserveA is a less-than operation.
This problem does not happen after 4.3.

This code is going to change significantly, so this won't be needed
soon.

Tested on x86_64 with g++ 4.3 and g++ 4.6.

PR bootstrap/54478
* vec.h (vec_t::alloc): Remove explicit type specification
in call to reserve.
(vec_t::copy): Likewise.
(vec_t::reserve): Likewise.
(vec_t::reserve_exact): Likewise.
(vec_t::safe_splice): Likewise.
(vec_t::safe_push): Likewise.
(vec_t::safe_grow): Likewise.
(vec_t::safe_grow_cleared): Likewise.
(vec_t::safe_insert): Likewise.

Modified:
trunk/gcc/ChangeLog
trunk/gcc/vec.h

--- Comment #5 from Diego Novillo dnovillo at gcc dot gnu.org 2012-09-04 
18:34:14 UTC ---
Fixed.


[Bug bootstrap/54478] [4.8 Regression] Fails to bootstrap with GCC 4.3.6

2012-09-04 Thread dnovillo at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=54478

Diego Novillo dnovillo at gcc dot gnu.org changed:

   What|Removed |Added

 Status|ASSIGNED|RESOLVED
 Resolution||FIXED

--- Comment #5 from Diego Novillo dnovillo at gcc dot gnu.org 2012-09-04 
18:34:14 UTC ---
Fixed.


[Bug bootstrap/54484] r190927 breaks bootstrap with clang compiler

2012-09-04 Thread dnovillo at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=54484

--- Comment #2 from Diego Novillo dnovillo at gcc dot gnu.org 2012-09-04 
21:07:56 UTC ---
Author: dnovillo
Date: Tue Sep  4 21:07:48 2012
New Revision: 190951

URL: http://gcc.gnu.org/viewcvs?root=gccview=revrev=190951
Log:
Fix bootstrap failure with clang++.

This patch fixes a bootstrap failure when using clang as the host
compiler.  Default arguments for class template member functions
should be added in the declaration, not the definition.

From Jason:

 8.3.6 says Default arguments for a member function of a class template shall
 be specified on the initial declaration of the member function within the
 class template.

PR bootstrap/54484
* vec.h (vec_t::embedded_init): Move default argument value
to function declaration.

Modified:
trunk/gcc/ChangeLog
trunk/gcc/vec.h


[Bug bootstrap/54484] r190927 breaks bootstrap with clang compiler

2012-09-04 Thread dnovillo at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=54484

Diego Novillo dnovillo at gcc dot gnu.org changed:

   What|Removed |Added

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

--- Comment #3 from Diego Novillo dnovillo at gcc dot gnu.org 2012-09-04 
21:09:59 UTC ---
Fixed.  From the IRC discussion:

16:55dnovillojason: ping
16:55jasondnovillo: pong
16:55dnovillojason: in
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=54484, is g++ being too lenient?
16:55gccbotBug 54484: normal, P3, ---, unassigned, UNCONFIRMED ,
r190927 breaks bootstrap with clang compiler
16:55dnovillojason: i put the default value in the *definition* of the
function, not the declaration.
16:56dnovilloi am fixing it with:
16:56dnovillo-  void embedded_init (int, int);
+  void embedded_init (int, int = 0);
16:56dnovilloand removing the dflt value from the definition.
16:56jasonhmm
16:56dnovillothis pacifies clang++, but i'm not sure whether clang++ is
being too picky
16:57dnovilloor g++ too lenient.
16:59dnovilloa cursory search on the web says that clang++ is correct:
http://clang-developers.42468.n3.nabble.com/default-arguments-cannot-be-added-to-an-out-of-line-definition-of-a-member-of-a-class-template-td3182781.html
17:00jasondnovillo: yes, clang seems to be right
17:00jasonI wonder why that restriction is there
17:00dnovillook, should i file a g++ bug?
17:01jasonsure
17:01jason8.3.6 says Default arguments for a member function of a
class template
17:01jasonshall be specified on the initial declaration of the member
function within the class template.


[Bug c++/54485] New: g++ should diagnose default arguments in out-of-line definitions for template class member functions

2012-09-04 Thread dnovillo at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=54485

 Bug #: 54485
   Summary: g++ should diagnose default arguments in out-of-line
definitions for template class member functions
Classification: Unclassified
   Product: gcc
   Version: 4.8.0
Status: UNCONFIRMED
  Keywords: accepts-invalid
  Severity: normal
  Priority: P3
 Component: c++
AssignedTo: unassig...@gcc.gnu.org
ReportedBy: dnovi...@gcc.gnu.org
CC: ja...@gcc.gnu.org


In PR 54484, bootstraps were broken with clang++.  The template class vec_t had
a member function with default arguments, but the default values were specified
in the function definition, instead of its declaration.

According to 8.3.6, that's incorrect: Default arguments for a member function
of a class template shall be specified on the initial declaration of the member
function within the class template.

$ cat a.cc
templatetypename T
class K
{
  int fn(int, int);
};

templatetypename T
int KT::fn (int a, int b = 3)
{
  return a - b;
}

$ g++ -c a.cc

$ clang++ -c a.cc
a.cc:8:26: error: default arguments cannot be added to an out-of-line
definition  of a member of a class template
int KT::fn (int a, int b = 3)
 ^   ~
1 error generated.

$ g++ --version
g++ (Ubuntu/Linaro 4.6.3-1ubuntu5) 4.6.3
Copyright (C) 2011 Free Software Foundation, Inc.This is free software; see the
source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

$ clang++ --version
Ubuntu clang version 3.0-6ubuntu3 (tags/RELEASE_30/final) (based on LLVM
3.0)Target: x86_64-pc-linux-gnu
Thread model: posix


[Bug fortran/54332] [4.8 Regression] 481.wrf in SPEC CPU 2006 takes 10GB memory to compile

2012-08-21 Thread dnovillo at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=54332

Diego Novillo dnovillo at gcc dot gnu.org changed:

   What|Removed |Added

 Status|NEW |ASSIGNED

--- Comment #12 from Diego Novillo dnovillo at gcc dot gnu.org 2012-08-21 
16:55:34 UTC ---
Thanks.  I'll work on a fix.


[Bug rtl-optimization/54343] RTL postreload leaks DF memory

2012-08-21 Thread dnovillo at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=54343

Diego Novillo dnovillo at gcc dot gnu.org changed:

   What|Removed |Added

 CC||dnovillo at gcc dot gnu.org

--- Comment #3 from Diego Novillo dnovillo at gcc dot gnu.org 2012-08-21 
21:25:20 UTC ---
HJ's fix for PR 54332 will probably fix this one, too.  Could you re-test?

Thanks.


[Bug bootstrap/54281] [4.8 Regression] Fails to bootstrap with --disable-nls

2012-08-17 Thread dnovillo at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=54281

--- Comment #10 from Diego Novillo dnovillo at gcc dot gnu.org 2012-08-17 
15:38:03 UTC ---
Author: dnovillo
Date: Fri Aug 17 15:37:57 2012
New Revision: 190487

URL: http://gcc.gnu.org/viewcvs?root=gccview=revrev=190487
Log:
2012-08-17  Diego Novillo  dnovi...@google.com

PR bootstrap/54281
* configure.ac: Add libintl.h to AC_CHECK_HEADERS list.
* config.in: Regenerate.
* configure: Regenerate.
* intl.h: Always include libintl.h if HAVE_LIBINTL_H is
set.

Modified:
trunk/gcc/ChangeLog
trunk/gcc/config.in
trunk/gcc/configure
trunk/gcc/configure.ac
trunk/gcc/intl.h


[Bug bootstrap/54281] [4.8 Regression] Fails to bootstrap with --disable-nls

2012-08-17 Thread dnovillo at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=54281

--- Comment #11 from Diego Novillo dnovillo at gcc dot gnu.org 2012-08-17 
16:17:20 UTC ---
Fixed.  http://gcc.gnu.org/ml/gcc-patches/2012-08/msg01181.html


[Bug bootstrap/54281] [4.8 Regression] Fails to bootstrap with --disable-nls

2012-08-17 Thread dnovillo at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=54281

Diego Novillo dnovillo at gcc dot gnu.org changed:

   What|Removed |Added

 Status|REOPENED|RESOLVED
 Resolution||FIXED

--- Comment #12 from Diego Novillo dnovillo at gcc dot gnu.org 2012-08-17 
16:19:02 UTC ---
.


[Bug bootstrap/54281] [4.8 Regression] Fails to bootstrap with --disable-nls

2012-08-16 Thread dnovillo at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=54281

--- Comment #4 from Diego Novillo dnovillo at gcc dot gnu.org 2012-08-16 
12:04:59 UTC ---
Tentative fix: http://gcc.gnu.org/ml/gcc-patches/2012-08/msg01046.html

Don't have an old enough compiler to test it myself.  Need help with testing.


[Bug bootstrap/54281] [4.8 Regression] Fails to bootstrap with --disable-nls

2012-08-16 Thread dnovillo at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=54281

--- Comment #5 from Diego Novillo dnovillo at gcc dot gnu.org 2012-08-16 
13:28:27 UTC ---
Author: dnovillo
Date: Thu Aug 16 13:28:13 2012
New Revision: 190444

URL: http://gcc.gnu.org/viewcvs?root=gccview=revrev=190444
Log:
2012-08-16  Diego Novillo  dnovi...@google.com

PR bootstrap/54281
* double-int.h: Move including of gmp.h ...
* system.h: ... here.
* realmpfr.h: Do not include gmp.h.
* tree-ssa-loop-niter.c: Do not include gmp.h.

fortran/ChangeLog
* gfortran.h: Do not include gmp.h.

Modified:
trunk/gcc/ChangeLog
trunk/gcc/double-int.h
trunk/gcc/fortran/ChangeLog
trunk/gcc/fortran/gfortran.h
trunk/gcc/realmpfr.h
trunk/gcc/system.h
trunk/gcc/tree-ssa-loop-niter.c


[Bug bootstrap/54281] [4.8 Regression] Fails to bootstrap with --disable-nls

2012-08-16 Thread dnovillo at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=54281

Diego Novillo dnovillo at gcc dot gnu.org changed:

   What|Removed |Added

 Status|UNCONFIRMED |RESOLVED
 Resolution||FIXED

--- Comment #6 from Diego Novillo dnovillo at gcc dot gnu.org 2012-08-16 
13:30:22 UTC ---
Fixed at rev 190444.


[Bug bootstrap/54281] [4.8 Regression] Fails to bootstrap with --disable-nls

2012-08-16 Thread dnovillo at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=54281

Diego Novillo dnovillo at gcc dot gnu.org changed:

   What|Removed |Added

 Status|RESOLVED|REOPENED
   Last reconfirmed||2012-08-16
 Resolution|FIXED   |
 Ever Confirmed|0   |1

--- Comment #7 from Diego Novillo dnovillo at gcc dot gnu.org 2012-08-16 
18:03:47 UTC ---
Mi fix broke Ada and in-tree cloog/isl.  I will revert and fix it without the
system.h modification.


[Bug bootstrap/54281] [4.8 Regression] Fails to bootstrap with --disable-nls

2012-08-16 Thread dnovillo at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=54281

--- Comment #8 from Diego Novillo dnovillo at gcc dot gnu.org 2012-08-16 
18:24:30 UTC ---
Author: dnovillo
Date: Thu Aug 16 18:24:22 2012
New Revision: 190449

URL: http://gcc.gnu.org/viewcvs?root=gccview=revrev=190449
Log:
2012-08-16   Diego Novillo  dnovi...@google.com

Revert

PR bootstrap/54281
* double-int.h: Move including of gmp.h ...
* system.h: ... here.
* realmpfr.h: Do not include gmp.h.
* tree-ssa-loop-niter.c: Do not include gmp.h.

Modified:
trunk/gcc/ChangeLog
trunk/gcc/double-int.h
trunk/gcc/fortran/ChangeLog
trunk/gcc/fortran/gfortran.h
trunk/gcc/realmpfr.h
trunk/gcc/system.h
trunk/gcc/tree-ssa-loop-niter.c


[Bug bootstrap/54281] [4.8 Regression] Fails to bootstrap with --disable-nls

2012-08-16 Thread dnovillo at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=54281

--- Comment #9 from Diego Novillo dnovillo at gcc dot gnu.org 2012-08-16 
18:42:48 UTC ---
New proposed patch.  Needs testing with a 4.1 compiler.  I couldn't build my
own (fails to build).

http://gcc.gnu.org/ml/gcc-patches/2012-08/msg01090.html


[Bug c++/51554] New: ICE in cp/semantics.c:cxx_eval_indirect_ref with -Wall

2011-12-14 Thread dnovillo at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=51554

 Bug #: 51554
   Summary: ICE in cp/semantics.c:cxx_eval_indirect_ref with -Wall
Classification: Unclassified
   Product: gcc
   Version: 4.7.0
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: c++
AssignedTo: unassig...@gcc.gnu.org
ReportedBy: dnovi...@gcc.gnu.org
CC: ja...@redhat.com, sing...@gcc.gnu.org


In:

static tree
cxx_eval_indirect_ref (const constexpr_call *call, tree t,
   bool allow_non_constant, bool addr,
   bool *non_constant_p)
{
[ ... ]
  if (r)
r = cxx_eval_constant_expression (call, r, allow_non_constant,
  addr, non_constant_p);
  else
{
  tree sub = op0;
  STRIP_NOPS (sub);
  if (TREE_CODE (sub) == ADDR_EXPR
  || TREE_CODE (sub) == POINTER_PLUS_EXPR)
{
==  gcc_assert (!same_type_ignoring_top_level_qualifiers_p
==  (TREE_TYPE (TREE_TYPE (sub)), TREE_TYPE (t)));
  /* DR 1188 says we don't have to deal with this.  */
  if (!allow_non_constant)

at the point of the failure, we have:

t: *((const uint8 *) XX[0] + 1);
sub: (const uint8 *) XX[0] + 1;

and (naturally) TREE_TYPE(t) is the same as TREE_TYPE(TREE_TYPE(sub)), so the
assertion fails trivially. 

The values for T and SUB seem to come unmodified all the way up from
process_init_constructor_array.  The original source code where this is coming
from is:

const uint8 F::V[] = {
  ...
  *(reinterpret_castconst uint8*(XX[0]) + 1),
  ...
};

This code seems to be enabled only with -Wall, the following reproducer only
fails if compiled with -Wall:

$ cat a.cc
typedef unsigned char uint8;
typedef unsigned int uint32;

const uint32 XX[] = { 1, 3, 7 };

const uint8 V[] = {
  *(reinterpret_castconst uint8*(XX[0]) + 0),
  *(reinterpret_castconst uint8*(XX[0]) + 1),
  *(reinterpret_castconst uint8*(XX[0]) + 2),
  *(reinterpret_castconst uint8*(XX[0]) + 3),
  *(reinterpret_castconst uint8*(XX[1]) + 0),
  *(reinterpret_castconst uint8*(XX[1]) + 1),
  *(reinterpret_castconst uint8*(XX[1]) + 2),
  *(reinterpret_castconst uint8*(XX[1]) + 3),
};

$ g++ -Wall -c a.cc
a.cc:15:1: internal compiler error: in cxx_eval_indirect_ref, at
cp/semantics.c:7321
Please submit a full bug report,
with preprocessed source if appropriate.


[Bug c++/51382] New: Incorrect diagnostic cannot appear in a constant-expression

2011-12-01 Thread dnovillo at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=51382

 Bug #: 51382
   Summary: Incorrect diagnostic cannot appear in a
constant-expression
Classification: Unclassified
   Product: gcc
   Version: 4.7.0
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: c++
AssignedTo: unassig...@gcc.gnu.org
ReportedBy: dnovi...@gcc.gnu.org
CC: cr...@google.com, fabien.ch...@gmail.com,
ja...@redhat.com


$ cat a.cc
template int Value 
struct Base
{
   enum { b_e = Value };
};

template typename Type 
struct Derived : Type
{
   Type::b_e;
   enum { d_e = b_e };
};

int v = (int)Derived Base 3  ::d_e;

$ ./g++ -c a.cc
a.cc: In instantiation of 'struct DerivedBase3 ':
a.cc:14:34:   required from here
a.cc:11:9: error: 'using Base3::b_e' cannot appear in a constant-expression

$ ./g++ --version
g++ (GCC) 4.7.0 2028 (experimental)
Copyright (C) 2011 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

There is an additional, possibly related, bug in the diagnostic.  This is not
exposed in this test case, but it shows up in the original source.
In another line of the same file, the following diagnostic is emitted:


file.h:1061:6: error: no match for 'operator*' in '2 * #'using_decl' not
supported by dump_expr#expression error'.  The code reads:

templateclass X
char SetX::fbs_[2 * k];


it's not clear to me whether the code is well-formed or not, but the diagnostic
should certainly not get all confused like that.

Lawrence, could you get a reproducer for this diagnostic?


Thanks.  Diego.


[Bug bootstrap/51346] [4.7 Regression] LTO bootstrap failed with bootstrap-profiled

2011-12-01 Thread dnovillo at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=51346

--- Comment #8 from Diego Novillo dnovillo at gcc dot gnu.org 2011-12-01 
21:05:14 UTC ---
Author: dnovillo
Date: Thu Dec  1 21:05:10 2011
New Revision: 181894

URL: http://gcc.gnu.org/viewcvs?root=gccview=revrev=181894
Log:
PR bootstrap/51346
* ipa-inline.c (can_inline_edge_p): If the edge E has a
statement, use the statement's inline indicator instead
of E's.
Remove consistency check.

Modified:
trunk/gcc/ChangeLog
trunk/gcc/ipa-inline.c


[Bug bootstrap/51346] [4.7 Regression] LTO bootstrap failed with bootstrap-profiled

2011-12-01 Thread dnovillo at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=51346

Diego Novillo dnovillo at gcc dot gnu.org changed:

   What|Removed |Added

 Status|ASSIGNED|RESOLVED
 Resolution||FIXED

--- Comment #9 from Diego Novillo dnovillo at gcc dot gnu.org 2011-12-01 
21:11:22 UTC ---
Fixed.  http://gcc.gnu.org/ml/gcc-patches/2011-12/msg00107.html.


[Bug bootstrap/51346] [4.7 Regression] LTO bootstrap failed with bootstrap-profiled

2011-11-30 Thread dnovillo at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=51346

Diego Novillo dnovillo at gcc dot gnu.org changed:

   What|Removed |Added

 CC||hubicka at gcc dot gnu.org

--- Comment #3 from Diego Novillo dnovillo at gcc dot gnu.org 2011-11-30 
20:17:08 UTC ---
The reason we get into this ICE is because the call to cgraph_edge() has the
side effect of adding entries to e-caller-call_site_hash:

  if (n  100)
{ 
  node-call_site_hash = htab_create_ggc (120, edge_hash, edge_eq, NULL);
  for (e2 = node-callees; e2; e2 = e2-next_callee)
cgraph_add_edge_to_call_site_hash (e2);
  for (e2 = node-indirect_calls; e2; e2 = e2-next_callee)
cgraph_add_edge_to_call_site_hash (e2);
}

When cgraph_edge is called with n  100, the call to
cgraph_add_edge_to_call_site_hash asserts because e-call_stmt is already in
the hash table.

Honza, why is this a problem?  The code is expecting to find the slot empty,
but I'm not sure why it expects that.  Any pointers?


Thanks.  Diego.


[Bug bootstrap/51346] [4.7 Regression] LTO bootstrap failed with bootstrap-profiled

2011-11-29 Thread dnovillo at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=51346

--- Comment #2 from Diego Novillo dnovillo at gcc dot gnu.org 2011-11-29 
17:50:01 UTC ---
Investigating.


[Bug bootstrap/51346] [4.7 Regression] LTO bootstrap failed with bootstrap-profiled

2011-11-29 Thread dnovillo at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=51346

Diego Novillo dnovillo at gcc dot gnu.org changed:

   What|Removed |Added

 Status|UNCONFIRMED |ASSIGNED
   Last reconfirmed||2011-11-29
 Ever Confirmed|0   |1


[Bug bootstrap/50709] [4.7 Regression] stage3 bootstrap comparison failure with --disable-checking config option

2011-11-24 Thread dnovillo at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=50709

--- Comment #8 from Diego Novillo dnovillo at gcc dot gnu.org 2011-11-24 
14:51:02 UTC ---
Author: dnovillo
Date: Thu Nov 24 14:50:56 2011
New Revision: 181692

URL: http://gcc.gnu.org/viewcvs?root=gccview=revrev=181692
Log:
Revert

PR bootstrap/50709
* ipa-inline.c (inline_small_functions):
Fix checking code to not make effect on fibheap stability.

Modified:
branches/pph/gcc/ChangeLog
branches/pph/gcc/ChangeLog.pph
branches/pph/gcc/ipa-inline.c


[Bug middle-end/50823] [4.7 Regression] ICE in inline_small_functions, at ipa-inline.c:1407

2011-11-23 Thread dnovillo at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=50823

Diego Novillo dnovillo at gcc dot gnu.org changed:

   What|Removed |Added

 CC||dnovillo at gcc dot gnu.org

--- Comment #12 from Diego Novillo dnovillo at gcc dot gnu.org 2011-11-23 
17:55:09 UTC ---
I am also seeing this failure building with -m32 -march=pentium4.  We fail the
assertion

+  gcc_assert (cached_badness == current_badness);

Sadly, it happens on a hairy large TU that I have not yet reduced.


[Bug rtl-optimization/50843] [4.7 Regression] ICE in simplify_subreg, simplify-rtx.c:5417 with -march=pentium3

2011-10-24 Thread dnovillo at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=50843

--- Comment #3 from Diego Novillo dnovillo at gcc dot gnu.org 2011-10-24 
17:07:54 UTC ---
This was working as of trunk rev 178998.


[Bug rtl-optimization/50843] New: ICE in simplify_subreg, simplify-rtx.c:5417 with -march=pentium3

2011-10-23 Thread dnovillo at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=50843

 Bug #: 50843
   Summary: ICE in simplify_subreg, simplify-rtx.c:5417 with
-march=pentium3
Classification: Unclassified
   Product: gcc
   Version: 4.7.0
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: rtl-optimization
AssignedTo: unassig...@gcc.gnu.org
ReportedBy: dnovi...@gcc.gnu.org


Several tests in gcc.c-torture are failing with -m32 -march=pentium3 on trunk
at rev 180234.

$ ./cc1  -fpreprocessed vector-shift.i -quiet -dumpbase vector-shift.c -m32
-march=pentium3 -auxbase vector-shift -O1 -w -version -o vector-shift.s
GNU C (GCC) version 4.7.0 20111020 (experimental) (x86_64-unknown-linux-gnu)
compiled by GNU C version 4.4.3, GMP version 4.3.2, MPFR version
2.4.2-p1, MPC version 0.8.1
GGC heuristics: --param ggc-min-expand=30 --param ggc-min-heapsize=4096
GNU C (GCC) version 4.7.0 20111020 (experimental) (x86_64-unknown-linux-gnu)
compiled by GNU C version 4.4.3, GMP version 4.3.2, MPFR version
2.4.2-p1, MPC version 0.8.1
GGC heuristics: --param ggc-min-expand=30 --param ggc-min-heapsize=4096
Compiler executable checksum: b4c9a0b913ea7f509422e8703450aae5
.../gcc/testsuite/gcc.c-torture/execute/vector-shift.c: In function 'main':
.../gcc/testsuite/gcc.c-torture/execute/vector-shift.c:48:1: internal compiler
error: in simplify_subreg, at simplify-rtx.c:5417
Please submit a full bug report,
with preprocessed source if appropriate.
See http://gcc.gnu.org/bugs.html for instructions.

I'm attaching the .i file for convenience.


[Bug rtl-optimization/50843] ICE in simplify_subreg, simplify-rtx.c:5417 with -march=pentium3

2011-10-23 Thread dnovillo at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=50843

--- Comment #1 from Diego Novillo dnovillo at gcc dot gnu.org 2011-10-24 
05:53:35 UTC ---
Created attachment 25584
  -- http://gcc.gnu.org/bugzilla/attachment.cgi?id=25584
Pre-processed source


[Bug tree-optimization/49516] SRA generates memory references into its replacements

2011-06-30 Thread dnovillo at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=49516

--- Comment #7 from Diego Novillo dnovillo at gcc dot gnu.org 2011-06-30 
13:24:06 UTC ---
Author: dnovillo
Date: Thu Jun 30 13:24:00 2011
New Revision: 175702

URL: http://gcc.gnu.org/viewcvs?root=gccview=revrev=175702
Log:
ChangeLog.google-4_6
2011-06-29  Diego Novillo  dnovi...@google.com

Backport from gcc-4_6-branch

2011-06-29  Martin Jambor  mjam...@suse.cz
Backport from mainline
2011-06-24  Martin Jambor  mjam...@suse.cz

PR tree-optimizations/49516
* tree-sra.c (sra_modify_assign): Choose the safe path for
aggregate copies if we also did scalar replacements.

testsuite/ChangeLog.google-4_6
2011-06-29  Diego Novillo  dnovi...@google.com

Backport from gcc-4_6-branch

2011-06-29  Martin Jambor  mjam...@suse.cz
Backport from mainline
2011-06-24  Martin Jambor  mjam...@suse.cz

PR tree-optimizations/49516
* g++.dg/tree-ssa/pr49516.C: New test.


Added:
branches/google/gcc-4_6/gcc/testsuite/g++.dg/tree-ssa/pr49516.C
  - copied unchanged from r175634,
branches/gcc-4_6-branch/gcc/testsuite/g++.dg/tree-ssa/pr49516.C
Modified:
branches/google/gcc-4_6/   (props changed)
branches/google/gcc-4_6/gcc/ChangeLog.google-4_6
branches/google/gcc-4_6/gcc/config/rs6000/rs6000.c   (props changed)
branches/google/gcc-4_6/gcc/config/rs6000/rs6000.h   (props changed)
branches/google/gcc-4_6/gcc/testsuite/ChangeLog.google-4_6
branches/google/gcc-4_6/gcc/testsuite/gcc.target/powerpc/ppc-round.c  
(props changed)
branches/google/gcc-4_6/gcc/tree-sra.c
branches/google/gcc-4_6/libjava/classpath/   (props changed)

Propchange: branches/google/gcc-4_6/
('svn:mergeinfo' modified)

Propchange: branches/google/gcc-4_6/
('svnmerge-integrated' modified)

Propchange: branches/google/gcc-4_6/gcc/config/rs6000/rs6000.c
('svn:mergeinfo' modified)

Propchange: branches/google/gcc-4_6/gcc/config/rs6000/rs6000.h
('svn:mergeinfo' modified)

Propchange:
branches/google/gcc-4_6/gcc/testsuite/gcc.target/powerpc/ppc-round.c
('svn:mergeinfo' modified)

Propchange: branches/google/gcc-4_6/libjava/classpath/
('svn:mergeinfo' modified)


[Bug libstdc++/48123] bits/cpu_defines.h not installed in freestanding mode.

2011-04-16 Thread dnovillo at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=48123

--- Comment #4 from Diego Novillo dnovillo at gcc dot gnu.org 2011-04-16 
20:31:49 UTC ---
Author: dnovillo
Date: Sat Apr 16 20:31:45 2011
New Revision: 172594

URL: http://gcc.gnu.org/viewcvs?root=gccview=revrev=172594
Log:
2011-03-15  Doug Kwan  dougk...@google.com

Google ref 50044.

PR libstdc++/48123
* include/Makefile.am (install-freestanding-headers): Install
cpu_defines.h
* include/Makefile.in: Regenerate.

Modified:
branches/google/main/libstdc++-v3/ChangeLog.google-main
branches/google/main/libstdc++-v3/include/Makefile.am
branches/google/main/libstdc++-v3/include/Makefile.in


[Bug gcov-profile/47793] Relative path in fprofile-use turns into absolute path

2011-04-04 Thread dnovillo at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=47793

--- Comment #1 from Diego Novillo dnovillo at gcc dot gnu.org 2011-04-04 
12:14:01 UTC ---
Author: dnovillo
Date: Mon Apr  4 12:13:54 2011
New Revision: 171935

URL: http://gcc.gnu.org/viewcvs?root=gccview=revrev=171935
Log:
2011-04-04  Martin Thuresson  mart...@google.com

   PR gcov-profile/47793
   * gcc.dg/pr47793.c: New test

Added:
branches/google/main/gcc/testsuite/ChangeLog.google-main
branches/google/main/gcc/testsuite/gcc.dg/pr47793.c


[Bug bootstrap/48167] [4.7 Regression] Bootstrapping revision 171075 fails on x86_64-apple-darwin10

2011-03-17 Thread dnovillo at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=48167

Diego Novillo dnovillo at gcc dot gnu.org changed:

   What|Removed |Added

 Status|UNCONFIRMED |ASSIGNED
   Last reconfirmed||2011.03.17 14:47:55
 CC||dnovillo at gcc dot gnu.org
 Ever Confirmed|0   |1


[Bug driver/48071] New: Blank line after 'all warnings being treated as errors'

2011-03-11 Thread dnovillo at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=48071

   Summary: Blank line after 'all warnings being treated as
errors'
   Product: gcc
   Version: 4.6.0
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: driver
AssignedTo: unassig...@gcc.gnu.org
ReportedBy: dnovi...@gcc.gnu.org


After -Werror is triggered, we are now emitting an extra blank line
that we were not emitting before.

$ cat a.cc
char c = 257;
$ g++-4.4.3 -c -o /dev/null -Werror a.cc
cc1plus: warnings being treated as errors
a.cc:1: error: overflow in implicit constant conversion
$

But with trunk, I get:

$ ~/gcc-trunk/native/bin/g++ -c -o /dev/null -Werror a.cc
a.cc:1:10: error: overflow in implicit constant conversion [-Werror=overflow]
cc1plus: all warnings being treated as errors
[... extra blank line ...]
$


[Bug target/46519] Missing vzeroupper

2011-02-02 Thread dnovillo at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=46519

--- Comment #10 from Diego Novillo dnovillo at gcc dot gnu.org 2011-02-02 
17:40:46 UTC ---
Author: dnovillo
Date: Wed Feb  2 17:40:40 2011
New Revision: 169536

URL: http://gcc.gnu.org/viewcvs?root=gccview=revrev=169536
Log:
Visit basic blocks using the work-list based algorithm.

2011-01-24  H.J. Lu  hongjiu...@intel.com

PR target/46519
* config/i386/i386.c: Include sbitmap.h and fibheap.h.
(block_info): Add scanned and prev.
(move_or_delete_vzeroupper_2): Return if the basic block
has been scanned and the upper 128bit state is unchanged
from the last scan.
(move_or_delete_vzeroupper_1): Return true if the exit
state is changed.
(move_or_delete_vzeroupper): Visit basic blocks using the
work-list based algorithm based on vt_find_locations in
var-tracking.c.

* config/i386/t-i386: Also depend on sbitmap.h and $(FIBHEAP_H).

Modified:
branches/google/integration/gcc/ChangeLog
branches/google/integration/gcc/config/i386/i386.c
branches/google/integration/gcc/config/i386/t-i386


[Bug libstdc++/47387] AIX ctype 'mask' override not working

2011-02-02 Thread dnovillo at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=47387

--- Comment #7 from Diego Novillo dnovillo at gcc dot gnu.org 2011-02-02 
17:41:46 UTC ---
Author: dnovillo
Date: Wed Feb  2 17:41:43 2011
New Revision: 169539

URL: http://gcc.gnu.org/viewcvs?root=gccview=revrev=169539
Log:
2011-01-24  Graham Reed  gr...@pobox.com

PR libstdc++/47387
* config/os/aix/ctype_inline.h (ctypechar::is): Use _M_table if
provided.

Modified:
branches/google/integration/libstdc++-v3/ChangeLog
branches/google/integration/libstdc++-v3/config/os/aix/ctype_inline.h


[Bug c/21659] [4.3/4.4/4.5 Regression] [unit-at-a-time] weak declaration must precede definition error missing at = O1

2011-02-02 Thread dnovillo at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=21659

--- Comment #12 from Diego Novillo dnovillo at gcc dot gnu.org 2011-02-02 
17:42:07 UTC ---
Author: dnovillo
Date: Wed Feb  2 17:42:05 2011
New Revision: 169542

URL: http://gcc.gnu.org/viewcvs?root=gccview=revrev=169542
Log:

PR c/21659
* doc/extend.texi (weak pragma): Drop claim that it must
appear before definition.
* varasm.c (merge_weak, declare_weak): Only sanity check
that DECL is not output at a time it is declared weak.

Modified:
branches/google/integration/gcc/ChangeLog
branches/google/integration/gcc/doc/extend.texi
branches/google/integration/gcc/varasm.c


[Bug go/47452] Bootstrap fails in libgo (argument has incompatible type)

2011-02-02 Thread dnovillo at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=47452

--- Comment #3 from Diego Novillo dnovillo at gcc dot gnu.org 2011-02-02 
17:42:33 UTC ---
Author: dnovillo
Date: Wed Feb  2 17:42:31 2011
New Revision: 169546

URL: http://gcc.gnu.org/viewcvs?root=gccview=revrev=169546
Log:
PR go/47452
Pick up local .gox files for specially built packages.

Modified:
branches/google/integration/libgo/Makefile.am
branches/google/integration/libgo/Makefile.in


[Bug rtl-optimization/47414] [4.6 Regression] wrong code with -O -freorder-blocks -fschedule-insns2 -fno-early-inlining -fstrict-aliasing -ftracer

2011-02-02 Thread dnovillo at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=47414

--- Comment #8 from Diego Novillo dnovillo at gcc dot gnu.org 2011-02-02 
17:45:53 UTC ---
Author: dnovillo
Date: Wed Feb  2 17:45:50 2011
New Revision: 169575

URL: http://gcc.gnu.org/viewcvs?root=gccview=revrev=169575
Log:
2011-01-25  Richard Guenther  rguent...@suse.de

PR middle-end/47414
* tree-ssa-alias.c (indirect_ref_may_alias_decl_p): Use the
correct type for TBAA.

Modified:
branches/google/integration/gcc/ChangeLog
branches/google/integration/gcc/tree-ssa-alias.c


[Bug rtl-optimization/37273] [4.4/4.5/4.6 Regression] IRA does not re-materializes addresses (loads from the TOC)

2011-02-02 Thread dnovillo at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=37273

--- Comment #11 from Diego Novillo dnovillo at gcc dot gnu.org 2011-02-02 
17:46:20 UTC ---
Author: dnovillo
Date: Wed Feb  2 17:46:18 2011
New Revision: 169579

URL: http://gcc.gnu.org/viewcvs?root=gccview=revrev=169579
Log:
PR rtl-optimization/37273
* ira-costs.c (scan_one_insn): Detect constants living in memory and
handle them like argument loads from stack slots.  Do not double
count memory for memory constants and argument loads from stack slots.

Modified:
branches/google/integration/gcc/ChangeLog
branches/google/integration/gcc/ira-costs.c


[Bug target/45701] [4.6 Regression] Fail to prefer using r3 for padding a push/pop multiple to 8-byte alignment

2011-02-02 Thread dnovillo at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=45701

--- Comment #12 from Diego Novillo dnovillo at gcc dot gnu.org 2011-02-02 
17:46:52 UTC ---
Author: dnovillo
Date: Wed Feb  2 17:46:50 2011
New Revision: 169583

URL: http://gcc.gnu.org/viewcvs?root=gccview=revrev=169583
Log:
PR target/45701
* config/arm/arm.c (any_sibcall_uses_r3): New function.
(arm_get_frame_offsets): Use it.

2011-01-25  Yao Qi  y...@codesourcery.com

PR target/45701
* gcc.target/arm/pr45701-1.c: New test.
* gcc.target/arm/pr45701-2.c: New test.
* gcc.target/arm/pr45701-3.c: New test.

Added:
branches/google/integration/gcc/testsuite/gcc.target/arm/pr45701-1.c
branches/google/integration/gcc/testsuite/gcc.target/arm/pr45701-2.c
branches/google/integration/gcc/testsuite/gcc.target/arm/pr45701-3.c
Modified:
branches/google/integration/gcc/ChangeLog
branches/google/integration/gcc/config/arm/arm.c
branches/google/integration/gcc/testsuite/ChangeLog


[Bug tree-optimization/47427] [4.6 Regression] ICE in process_constraint, at tree-ssa-structalias.c:2901

2011-02-02 Thread dnovillo at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=47427

--- Comment #7 from Diego Novillo dnovillo at gcc dot gnu.org 2011-02-02 
17:46:08 UTC ---
Author: dnovillo
Date: Wed Feb  2 17:46:04 2011
New Revision: 169577

URL: http://gcc.gnu.org/viewcvs?root=gccview=revrev=169577
Log:
PR tree-optimization/47427
PR tree-optimization/47428
* tree-ssa-copyrename.c (copy_rename_partition_coalesce): Don't
coalesce if the new root var would be TREE_READONLY.

* gcc.c-torture/compile/pr47427.c: New test.
* gcc.c-torture/compile/pr47428.c: New test.

Added:
branches/google/integration/gcc/testsuite/gcc.c-torture/compile/pr47427.c
branches/google/integration/gcc/testsuite/gcc.c-torture/compile/pr47428.c
Modified:
branches/google/integration/gcc/ChangeLog
branches/google/integration/gcc/testsuite/ChangeLog
branches/google/integration/gcc/tree-ssa-copyrename.c


[Bug tree-optimization/47428] [4.6 Regression] ICE: tree check: expected ssa_name, have integer_cst in copy_phis_for_bb, at tree-inline.c:1986

2011-02-02 Thread dnovillo at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=47428

--- Comment #8 from Diego Novillo dnovillo at gcc dot gnu.org 2011-02-02 
17:46:08 UTC ---
Author: dnovillo
Date: Wed Feb  2 17:46:04 2011
New Revision: 169577

URL: http://gcc.gnu.org/viewcvs?root=gccview=revrev=169577
Log:
PR tree-optimization/47427
PR tree-optimization/47428
* tree-ssa-copyrename.c (copy_rename_partition_coalesce): Don't
coalesce if the new root var would be TREE_READONLY.

* gcc.c-torture/compile/pr47427.c: New test.
* gcc.c-torture/compile/pr47428.c: New test.

Added:
branches/google/integration/gcc/testsuite/gcc.c-torture/compile/pr47427.c
branches/google/integration/gcc/testsuite/gcc.c-torture/compile/pr47428.c
Modified:
branches/google/integration/gcc/ChangeLog
branches/google/integration/gcc/testsuite/ChangeLog
branches/google/integration/gcc/tree-ssa-copyrename.c


[Bug tree-optimization/43567] linear loop transform

2011-02-02 Thread dnovillo at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=43567

--- Comment #10 from Diego Novillo dnovillo at gcc dot gnu.org 2011-02-02 
17:48:04 UTC ---
Author: dnovillo
Date: Wed Feb  2 17:48:00 2011
New Revision: 169591

URL: http://gcc.gnu.org/viewcvs?root=gccview=revrev=169591
Log:
Add testcase for PR43567.

2011-01-25  Sebastian Pop  sebastian@amd.com

PR tree-optimization/43567
* gcc.dg/graphite/pr43567.c: New.

Added:
branches/google/integration/gcc/testsuite/gcc.dg/graphite/pr43567.c
Modified:
branches/google/integration/gcc/ChangeLog.graphite
branches/google/integration/gcc/testsuite/ChangeLog


[Bug tree-optimization/47382] [4.6 Regression] g++.dg/ipa/devirt-d-1.C FAILs with -finline-functions

2011-02-02 Thread dnovillo at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=47382

--- Comment #5 from Diego Novillo dnovillo at gcc dot gnu.org 2011-02-02 
17:47:25 UTC ---
Author: dnovillo
Date: Wed Feb  2 17:47:21 2011
New Revision: 169587

URL: http://gcc.gnu.org/viewcvs?root=gccview=revrev=169587
Log:
2011-01-25  Martin Jambor  mjam...@suse.cz

PR tree-optimization/47382
* gimple-fold.c (gimple_fold_obj_type_ref_call): Removed.
(gimple_fold_call): Do not call gimple_fold_obj_type_ref_call.

* testsuite/g++.dg/torture/pr47382.C: New test.
* testsuite/g++.dg/opt/devirt1.C: Xfail.

Added:
branches/google/integration/gcc/testsuite/g++.dg/torture/pr47382.C
Modified:
branches/google/integration/gcc/ChangeLog
branches/google/integration/gcc/gimple-fold.c
branches/google/integration/gcc/testsuite/ChangeLog
branches/google/integration/gcc/testsuite/g++.dg/opt/devirt1.C


[Bug tree-optimization/47271] [4.6 Regression] if-conversion removes a test (if), the function generates invalid outputs

2011-02-02 Thread dnovillo at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=47271

--- Comment #18 from Diego Novillo dnovillo at gcc dot gnu.org 2011-02-02 
17:46:36 UTC ---
Author: dnovillo
Date: Wed Feb  2 17:46:33 2011
New Revision: 169581

URL: http://gcc.gnu.org/viewcvs?root=gccview=revrev=169581
Log:
Fix PR47271: only if-convert full writes.

2011-01-25  Sebastian Pop  sebastian@amd.com
Jakub Jelinek  ja...@redhat.com

PR tree-optimization/47271
* tree-if-conv.c (bb_postdominates_preds): New.
(if_convertible_bb_p): Call bb_postdominates_preds.
(if_convertible_loop_p_1): Compute CDI_POST_DOMINATORS.
(predicate_scalar_phi): Call bb_postdominates_preds.

* gcc.dg/tree-ssa/ifc-pr47271.c: New.

Added:
branches/google/integration/gcc/testsuite/gcc.dg/tree-ssa/ifc-pr47271.c
Modified:
branches/google/integration/gcc/ChangeLog
branches/google/integration/gcc/testsuite/ChangeLog
branches/google/integration/gcc/tree-if-conv.c


[Bug tree-optimization/47265] [4.6 Regression] Error: SSA name in freelist but still referenced

2011-02-02 Thread dnovillo at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=47265

--- Comment #11 from Diego Novillo dnovillo at gcc dot gnu.org 2011-02-02 
17:47:39 UTC ---
Author: dnovillo
Date: Wed Feb  2 17:47:35 2011
New Revision: 169589

URL: http://gcc.gnu.org/viewcvs?root=gccview=revrev=169589
Log:
PR tree-optimization/47265
PR tree-optimization/47443
* tree-ssa-forwprop.c (forward_propagate_addr_expr): Return false
if name still has some uses.

* gcc.c-torture/compile/pr47265.c: New test.
* gcc.dg/pr47443.c: New test.

Added:
branches/google/integration/gcc/testsuite/gcc.c-torture/compile/pr47265.c
branches/google/integration/gcc/testsuite/gcc.dg/pr47443.c
Modified:
branches/google/integration/gcc/ChangeLog
branches/google/integration/gcc/testsuite/ChangeLog
branches/google/integration/gcc/tree-ssa-forwprop.c


[Bug tree-optimization/47443] [4.6 Regression] ICE: SSA name in freelist but still referenced or SIGSEGV with -fstack-check=generic

2011-02-02 Thread dnovillo at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=47443

--- Comment #4 from Diego Novillo dnovillo at gcc dot gnu.org 2011-02-02 
17:47:40 UTC ---
Author: dnovillo
Date: Wed Feb  2 17:47:35 2011
New Revision: 169589

URL: http://gcc.gnu.org/viewcvs?root=gccview=revrev=169589
Log:
PR tree-optimization/47265
PR tree-optimization/47443
* tree-ssa-forwprop.c (forward_propagate_addr_expr): Return false
if name still has some uses.

* gcc.c-torture/compile/pr47265.c: New test.
* gcc.dg/pr47443.c: New test.

Added:
branches/google/integration/gcc/testsuite/gcc.c-torture/compile/pr47265.c
branches/google/integration/gcc/testsuite/gcc.dg/pr47443.c
Modified:
branches/google/integration/gcc/ChangeLog
branches/google/integration/gcc/testsuite/ChangeLog
branches/google/integration/gcc/tree-ssa-forwprop.c


[Bug tree-optimization/47426] [4.6 Regression] wrong code with -O2 -fipa-pta

2011-02-02 Thread dnovillo at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=47426

--- Comment #7 from Diego Novillo dnovillo at gcc dot gnu.org 2011-02-02 
17:47:02 UTC ---
Author: dnovillo
Date: Wed Feb  2 17:46:57 2011
New Revision: 169584

URL: http://gcc.gnu.org/viewcvs?root=gccview=revrev=169584
Log:
2011-01-25  Richard Guenther  rguent...@suse.de

PR tree-optimization/47426
* tree-ssa-structalias.c (ipa_pta_execute): Make externally
visible functions results escape.

* gcc.dg/torture/pr47426-1.c: New testcase.
* gcc.dg/torture/pr47426-2.c: Likewise.

Added:
branches/google/integration/gcc/testsuite/gcc.dg/torture/pr47426-1.c
branches/google/integration/gcc/testsuite/gcc.dg/torture/pr47426-2.c
Modified:
branches/google/integration/gcc/ChangeLog
branches/google/integration/gcc/tree-ssa-structalias.c


[Bug debug/45136] -fcompare-debug failure with -Os -fschedule-insns

2011-02-02 Thread dnovillo at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=45136

--- Comment #15 from Diego Novillo dnovillo at gcc dot gnu.org 2011-02-02 
17:49:12 UTC ---
Author: dnovillo
Date: Wed Feb  2 17:49:06 2011
New Revision: 169597

URL: http://gcc.gnu.org/viewcvs?root=gccview=revrev=169597
Log:
PR debug/45136
PR debug/45130
* haifa-sched.c (get_ebb_head_tail): Move notes across boundary
debug insns.
(no_real_insns_p, schedule_block, set_priorities): Drop special
treatment of boundary debug insns.
* sched-deps.c (sd_init_insn, sd_finish_insn): Don't mark debug
insns.
* sched-ebb.c (schedule_ebbs): Don't skip debug insns.
* sched-int.h (DEBUG_INSN_SCHED_P): Remove.
(BOUNDARY_DEBUG_INSN_P): Likewise.
(SCHEDULE_DEBUG_INSN_P): Likewise.
* sched-rgn.c (init_ready_list): Drop special treatment of
boundary debug insns.
* final.c (rest_of_clean-state): Clear notes' BB.

Modified:
branches/google/integration/gcc/ChangeLog
branches/google/integration/gcc/final.c
branches/google/integration/gcc/haifa-sched.c
branches/google/integration/gcc/sched-deps.c
branches/google/integration/gcc/sched-ebb.c
branches/google/integration/gcc/sched-int.h
branches/google/integration/gcc/sched-rgn.c


[Bug tree-optimization/46215] ICE: verify_stmts failed: type mismatch in comparison expression with -fstrict-overflow -fno-tree-ch -ftree-loop-linear

2011-02-02 Thread dnovillo at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=46215

--- Comment #5 from Diego Novillo dnovillo at gcc dot gnu.org 2011-02-02 
17:48:45 UTC ---
Author: dnovillo
Date: Wed Feb  2 17:48:39 2011
New Revision: 169595

URL: http://gcc.gnu.org/viewcvs?root=gccview=revrev=169595
Log:
Add testcase for PR46215.

2011-01-18  Sebastian Pop  sebastian@amd.com

PR tree-optimization/46215
* gcc.dg/graphite/pr46215.c: New.

Added:
branches/google/integration/gcc/testsuite/gcc.dg/graphite/pr46215.c
Modified:
branches/google/integration/gcc/testsuite/ChangeLog


[Bug libfortran/47375] GETLOG not threadsafe, causes warnings/wrong-code with static linking

2011-02-02 Thread dnovillo at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=47375

--- Comment #9 from Diego Novillo dnovillo at gcc dot gnu.org 2011-02-02 
17:47:18 UTC ---
Author: dnovillo
Date: Wed Feb  2 17:47:13 2011
New Revision: 169586

URL: http://gcc.gnu.org/viewcvs?root=gccview=revrev=169586
Log:
PR 47375 getlog thread safety

Modified:
branches/google/integration/libgfortran/ChangeLog
branches/google/integration/libgfortran/config.h.in
branches/google/integration/libgfortran/configure
branches/google/integration/libgfortran/configure.ac
branches/google/integration/libgfortran/intrinsics/getlog.c


[Bug tree-optimization/26854] Inordinate compile times on large routines

2011-02-02 Thread dnovillo at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=26854

--- Comment #128 from ian at gcc dot gnu.org ian at gcc dot gnu.org 
2011-01-26 01:26:52 UTC ---
Author: ian
Date: Wed Jan 26 01:26:48 2011
New Revision: 169267

URL: http://gcc.gnu.org/viewcvs?root=gccview=revrev=169267
Log:
PR tree-optimization/26854
* c-decl.c (struct c_scope): Add field has_jump_unsafe_decl.
(decl_jump_unsafe): Move higher in file, with no other change.
(bind): Set has_jump_unsafe_decl if appropriate.
(update_label_decls): Test has_jump_unsafe_decl to avoid loop.
(check_earlier_gotos): Likewise.
(c_check_switch_jump_warnings): Likewise.

Modified:
trunk/gcc/ChangeLog
trunk/gcc/c-decl.c

--- Comment #129 from Diego Novillo dnovillo at gcc dot gnu.org 2011-02-02 
17:50:06 UTC ---
Author: dnovillo
Date: Wed Feb  2 17:49:54 2011
New Revision: 169601

URL: http://gcc.gnu.org/viewcvs?root=gccview=revrev=169601
Log:
PR tree-optimization/26854
* c-decl.c (struct c_scope): Add field has_jump_unsafe_decl.
(decl_jump_unsafe): Move higher in file, with no other change.
(bind): Set has_jump_unsafe_decl if appropriate.
(update_label_decls): Test has_jump_unsafe_decl to avoid loop.
(check_earlier_gotos): Likewise.
(c_check_switch_jump_warnings): Likewise.

Modified:
branches/google/integration/gcc/ChangeLog
branches/google/integration/gcc/c-decl.c


[Bug tree-optimization/47411] [4.5 Regression] Bootstrap failure on x86-64/Darwin

2011-02-02 Thread dnovillo at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=47411

--- Comment #9 from Diego Novillo dnovillo at gcc dot gnu.org 2011-02-02 
17:46:00 UTC ---
Author: dnovillo
Date: Wed Feb  2 17:45:57 2011
New Revision: 169576

URL: http://gcc.gnu.org/viewcvs?root=gccview=revrev=169576
Log:
2011-01-25  Richard Guenther  rguent...@suse.de

PR middle-end/47411
* gcc.dg/torture/pr47411.c: New testcase.

Added:
branches/google/integration/gcc/testsuite/gcc.dg/torture/pr47411.c
Modified:
branches/google/integration/gcc/testsuite/ChangeLog


[Bug tree-optimization/46970] [4.3/4.4/4.5/4.6 Regression] wrong code with -Os -ftree-loop-linear

2011-02-02 Thread dnovillo at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=46970

--- Comment #10 from Diego Novillo dnovillo at gcc dot gnu.org 2011-02-02 
17:49:01 UTC ---
Author: dnovillo
Date: Wed Feb  2 17:48:51 2011
New Revision: 169596

URL: http://gcc.gnu.org/viewcvs?root=gccview=revrev=169596
Log:
Add testcase for PR46970.

2011-01-18  Sebastian Pop  sebastian@amd.com

PR tree-optimization/46970
* gcc.dg/graphite/pr46970.c: New.

Added:
branches/google/integration/gcc/testsuite/gcc.dg/graphite/pr46970.c
Modified:
branches/google/integration/gcc/testsuite/ChangeLog


[Bug tree-optimization/46168] [4.3/4.4/4.5/4.6 Regression] ICE: verify_ssa failed: definition in block 6 does not dominate use in block 5 with -ftree-loop-linear

2011-02-02 Thread dnovillo at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=46168

--- Comment #7 from Diego Novillo dnovillo at gcc dot gnu.org 2011-02-02 
17:48:33 UTC ---
Author: dnovillo
Date: Wed Feb  2 17:48:28 2011
New Revision: 169594

URL: http://gcc.gnu.org/viewcvs?root=gccview=revrev=169594
Log:
Add testcase for PR46168.

2011-01-18  Sebastian Pop  sebastian@amd.com

PR tree-optimization/46168
* gcc.dg/graphite/pr46168.c: New.

Added:
branches/google/integration/gcc/testsuite/gcc.dg/graphite/pr46168.c
Modified:
branches/google/integration/gcc/testsuite/ChangeLog


[Bug tree-optimization/29832] -ftree-loop-linear miscompiles scalarize.f90

2011-02-02 Thread dnovillo at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=29832

--- Comment #12 from Diego Novillo dnovillo at gcc dot gnu.org 2011-02-02 
17:48:11 UTC ---
Author: dnovillo
Date: Wed Feb  2 17:48:08 2011
New Revision: 169592

URL: http://gcc.gnu.org/viewcvs?root=gccview=revrev=169592
Log:
Add testcase for PR29832.

2011-01-25  Sebastian Pop  sebastian@amd.com

PR tree-optimization/29832
* gfortran.dg/graphite/pr29832.f90: New.

Added:
branches/google/integration/gcc/testsuite/gfortran.dg/graphite/pr29832.f90
Modified:
branches/google/integration/gcc/testsuite/ChangeLog


[Bug fortran/47448] Invalid check for ASSIGNMENT(=)

2011-02-02 Thread dnovillo at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=47448

--- Comment #5 from Diego Novillo dnovillo at gcc dot gnu.org 2011-02-02 
17:46:13 UTC ---
Author: dnovillo
Date: Wed Feb  2 17:46:11 2011
New Revision: 169578

URL: http://gcc.gnu.org/viewcvs?root=gccview=revrev=169578
Log:
2011-01-25  Tobias Burnus  bur...@net-b.de

PR fortran/47448
* interface.c (gfc_check_operator_interface): Fix
defined-assignment check.

2011-01-25  Tobias Burnus  bur...@net-b.de

PR fortran/47448
* gfortran.dg/redefined_intrinsic_assignment_2.f90: New.

Added:
   
branches/google/integration/gcc/testsuite/gfortran.dg/redefined_intrinsic_assignment_2.f90
Modified:
branches/google/integration/gcc/fortran/ChangeLog
branches/google/integration/gcc/fortran/interface.c
branches/google/integration/gcc/testsuite/ChangeLog


[Bug debug/45130] -fcompare-debug failure with -Os -fsched-spec-load -fschedule-insns

2011-02-02 Thread dnovillo at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=45130

--- Comment #7 from Diego Novillo dnovillo at gcc dot gnu.org 2011-02-02 
17:49:12 UTC ---
Author: dnovillo
Date: Wed Feb  2 17:49:06 2011
New Revision: 169597

URL: http://gcc.gnu.org/viewcvs?root=gccview=revrev=169597
Log:
PR debug/45136
PR debug/45130
* haifa-sched.c (get_ebb_head_tail): Move notes across boundary
debug insns.
(no_real_insns_p, schedule_block, set_priorities): Drop special
treatment of boundary debug insns.
* sched-deps.c (sd_init_insn, sd_finish_insn): Don't mark debug
insns.
* sched-ebb.c (schedule_ebbs): Don't skip debug insns.
* sched-int.h (DEBUG_INSN_SCHED_P): Remove.
(BOUNDARY_DEBUG_INSN_P): Likewise.
(SCHEDULE_DEBUG_INSN_P): Likewise.
* sched-rgn.c (init_ready_list): Drop special treatment of
boundary debug insns.
* final.c (rest_of_clean-state): Clear notes' BB.

Modified:
branches/google/integration/gcc/ChangeLog
branches/google/integration/gcc/final.c
branches/google/integration/gcc/haifa-sched.c
branches/google/integration/gcc/sched-deps.c
branches/google/integration/gcc/sched-ebb.c
branches/google/integration/gcc/sched-int.h
branches/google/integration/gcc/sched-rgn.c


[Bug fortran/47339] Fortran 2003/2008: Valid NAMELIST rejected; Fortran 95: Invalid namelist objects accepted

2011-02-02 Thread dnovillo at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=47339

--- Comment #7 from Diego Novillo dnovillo at gcc dot gnu.org 2011-02-02 
17:52:20 UTC ---
Author: dnovillo
Date: Wed Feb  2 17:52:14 2011
New Revision: 169614

URL: http://gcc.gnu.org/viewcvs?root=gccview=revrev=169614
Log:
2011-01-26  Tobias Burnus  bur...@net-b.de

PR fortran/47339
PR fortran/43062
* match.c (gfc_match_namelist): Allow assumed-length characters.
* resolve.c (resolve_fl_namelist): Adapt and add error messages.
* symbol.c (check_conflict): Allow allocatables in NML for
* F2003.
* trans-io.c (nml_get_addr_expr,transfer_namelist_element):
Changes due to that change.

2011-01-26  Tobias Burnus  bur...@net-b.de

PR fortran/47339
PR fortran/43062
* fortran.dg/namelist_69.f90: New test.
* fortran.dg/namelist_70.f90: New test.
* fortran.dg/namelist_assumed_char.f90: Modify dg-error, augment
* test.
* fortran.dg/namelist_3.f90: Adapt test.
* fortran.dg/namelist_34.f90: Ditto.
* fortran.dg/namelist_35.f90: Ditto.
* fortran.dg/namelist_5.f90: Ditto.
* fortran.dg/namelist_63.f90: Ditto.
* gfortran.dg/alloc_comp_constraint_1.f90: Ditto.

Added:
branches/google/integration/gcc/testsuite/gfortran.dg/namelist_69.f90
branches/google/integration/gcc/testsuite/gfortran.dg/namelist_70.f90
Modified:
branches/google/integration/gcc/fortran/match.c
branches/google/integration/gcc/fortran/resolve.c
branches/google/integration/gcc/fortran/symbol.c
branches/google/integration/gcc/fortran/trans-io.c
   
branches/google/integration/gcc/testsuite/gfortran.dg/alloc_comp_constraint_1.f90
branches/google/integration/gcc/testsuite/gfortran.dg/namelist_3.f90
branches/google/integration/gcc/testsuite/gfortran.dg/namelist_34.f90
branches/google/integration/gcc/testsuite/gfortran.dg/namelist_35.f90
branches/google/integration/gcc/testsuite/gfortran.dg/namelist_5.f90
branches/google/integration/gcc/testsuite/gfortran.dg/namelist_63.f90
   
branches/google/integration/gcc/testsuite/gfortran.dg/namelist_assumed_char.f90


[Bug lto/47423] Many testsuite failures caused by missing gxx_visibility_sj0

2011-02-02 Thread dnovillo at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=47423

--- Comment #6 from Diego Novillo dnovillo at gcc dot gnu.org 2011-02-02 
17:52:33 UTC ---
Author: dnovillo
Date: Wed Feb  2 17:52:24 2011
New Revision: 169615

URL: http://gcc.gnu.org/viewcvs?root=gccview=revrev=169615
Log:
2011-01-26  Richard Guenther  rguent...@suse.de

PR lto/47423
* cgraphbuild.c (record_eh_tables): Record reference to personality
function.

Modified:
branches/google/integration/gcc/ChangeLog
branches/google/integration/gcc/cgraphbuild.c


[Bug target/47246] [4.6 Regression] Invalid immediate offset for Thumb VFP store regression

2011-02-02 Thread dnovillo at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=47246

--- Comment #8 from Diego Novillo dnovillo at gcc dot gnu.org 2011-02-02 
17:51:01 UTC ---
Author: dnovillo
Date: Wed Feb  2 17:50:47 2011
New Revision: 169605

URL: http://gcc.gnu.org/viewcvs?root=gccview=revrev=169605
Log:
2011-01-26  Chung-Lin Tang  clt...@codesourcery.com

PR target/47246
* config/arm/arm.c (thumb2_legitimate_index_p): Change the
lower bound of the allowed Thumb-2 coprocessor load/store
index range to -256. Add explaining comment.

Modified:
branches/google/integration/gcc/ChangeLog
branches/google/integration/gcc/config/arm/arm.c


[Bug fortran/43062] NAMELIST attribute conflicts with ALLOCATABLE attribute

2011-02-02 Thread dnovillo at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=43062

--- Comment #29 from Diego Novillo dnovillo at gcc dot gnu.org 2011-02-02 
17:52:20 UTC ---
Author: dnovillo
Date: Wed Feb  2 17:52:14 2011
New Revision: 169614

URL: http://gcc.gnu.org/viewcvs?root=gccview=revrev=169614
Log:
2011-01-26  Tobias Burnus  bur...@net-b.de

PR fortran/47339
PR fortran/43062
* match.c (gfc_match_namelist): Allow assumed-length characters.
* resolve.c (resolve_fl_namelist): Adapt and add error messages.
* symbol.c (check_conflict): Allow allocatables in NML for
* F2003.
* trans-io.c (nml_get_addr_expr,transfer_namelist_element):
Changes due to that change.

2011-01-26  Tobias Burnus  bur...@net-b.de

PR fortran/47339
PR fortran/43062
* fortran.dg/namelist_69.f90: New test.
* fortran.dg/namelist_70.f90: New test.
* fortran.dg/namelist_assumed_char.f90: Modify dg-error, augment
* test.
* fortran.dg/namelist_3.f90: Adapt test.
* fortran.dg/namelist_34.f90: Ditto.
* fortran.dg/namelist_35.f90: Ditto.
* fortran.dg/namelist_5.f90: Ditto.
* fortran.dg/namelist_63.f90: Ditto.
* gfortran.dg/alloc_comp_constraint_1.f90: Ditto.

Added:
branches/google/integration/gcc/testsuite/gfortran.dg/namelist_69.f90
branches/google/integration/gcc/testsuite/gfortran.dg/namelist_70.f90
Modified:
branches/google/integration/gcc/fortran/match.c
branches/google/integration/gcc/fortran/resolve.c
branches/google/integration/gcc/fortran/symbol.c
branches/google/integration/gcc/fortran/trans-io.c
   
branches/google/integration/gcc/testsuite/gfortran.dg/alloc_comp_constraint_1.f90
branches/google/integration/gcc/testsuite/gfortran.dg/namelist_3.f90
branches/google/integration/gcc/testsuite/gfortran.dg/namelist_34.f90
branches/google/integration/gcc/testsuite/gfortran.dg/namelist_35.f90
branches/google/integration/gcc/testsuite/gfortran.dg/namelist_5.f90
branches/google/integration/gcc/testsuite/gfortran.dg/namelist_63.f90
   
branches/google/integration/gcc/testsuite/gfortran.dg/namelist_assumed_char.f90


[Bug tree-optimization/47237] [4.3/4.4/4.5 Regression] builtin_apply_args broken WRT local ABI changes.

2011-02-02 Thread dnovillo at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=47237

--- Comment #8 from Diego Novillo dnovillo at gcc dot gnu.org 2011-02-02 
17:53:23 UTC ---
Author: dnovillo
Date: Wed Feb  2 17:53:17 2011
New Revision: 169620

URL: http://gcc.gnu.org/viewcvs?root=gccview=revrev=169620
Log:
PR target/47237
* gcc.c-torture/execute/pr47237.c: New testcase.

* cgraph.h (cgraph_local_info): New field can_change_signature.
* ipa-cp.c (ipcp_update_callgraph): Only compute args_to_skip if callee
signature can change.
(ipcp_estimate_growth): Call sequence simplify only if calle signature
can change.
(ipcp_insert_stage): Only compute args_to_skip if signature can change.
(cgraph_function_versioning): We can not change signature of functions
that don't allow that.
* lto-cgraph.c (lto_output_node): Stream local.can_change_signature.
(lto_input_node): Likewise.
* ipa-inline.c (compute_inline_parameters): Compute
local.can_change_signature.
* ipa-split.c (visit_bb): Never split away APPLY_ARGS.
* tree-sra.c (ipa_sra_preliminary_function_checks): Give up on functions
that can not change signature.
* i386.c (ix86_function_regparm, ix86_function_sseregparm,
init_cumulative_args): Do not use local calling conventions for functions
that can not change signature.

Modified:
branches/google/integration/gcc/ChangeLog
branches/google/integration/gcc/testsuite/ChangeLog


[Bug other/47467] [4.6 Regression] hwint.h:239:3: error: implicit declaration of function 'abs'

2011-02-02 Thread dnovillo at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=47467

--- Comment #11 from Diego Novillo dnovillo at gcc dot gnu.org 2011-02-02 
17:52:42 UTC ---
Author: dnovillo
Date: Wed Feb  2 17:52:33 2011
New Revision: 169616

URL: http://gcc.gnu.org/viewcvs?root=gccview=revrev=169616
Log:
2011-01-26  Richard Guenther  rguent...@suse.de

PR bootstrap/47467
* targext.c: Include config.h.
* gcc-interface/Make-lang.in (ada/targext.o): Add $(CONFIG_H)
dependency.

Modified:
branches/google/integration/gcc/ada/ChangeLog
branches/google/integration/gcc/ada/gcc-interface/Make-lang.in
branches/google/integration/gcc/ada/targext.c


[Bug c++/47476] [4.6 Regression] [C++0x] ICE in potential_constant_expression_1

2011-02-02 Thread dnovillo at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=47476

--- Comment #5 from Diego Novillo dnovillo at gcc dot gnu.org 2011-02-02 
17:54:54 UTC ---
Author: dnovillo
Date: Wed Feb  2 17:54:50 2011
New Revision: 169630

URL: http://gcc.gnu.org/viewcvs?root=gccview=revrev=169630
Log:
PR c++/47476
* semantics.c (potential_constant_expression_1): Handle
TRUTH_XOR_EXPR.

* g++.dg/cpp0x/pr47476.C: New test.

Added:
branches/google/integration/gcc/testsuite/g++.dg/cpp0x/pr47476.C
Modified:
branches/google/integration/gcc/cp/ChangeLog
branches/google/integration/gcc/cp/semantics.c
branches/google/integration/gcc/testsuite/ChangeLog


[Bug tree-optimization/47237] [4.3/4.4/4.5 Regression] builtin_apply_args broken WRT local ABI changes.

2011-02-02 Thread dnovillo at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=47237

--- Comment #7 from Diego Novillo dnovillo at gcc dot gnu.org 2011-02-02 
17:53:16 UTC ---
Author: dnovillo
Date: Wed Feb  2 17:53:08 2011
New Revision: 169619

URL: http://gcc.gnu.org/viewcvs?root=gccview=revrev=169619
Log:
PR target/47237
* cgraph.h (cgraph_local_info): New field can_change_signature.
* ipa-cp.c (ipcp_update_callgraph): Only compute args_to_skip if callee
signature can change.
(ipcp_estimate_growth): Call sequence simplify only if calle signature
can change.
(ipcp_insert_stage): Only compute args_to_skip if signature can change.
(cgraph_function_versioning): We can not change signature of functions
that don't allow that.
* lto-cgraph.c (lto_output_node): Stream local.can_change_signature.
(lto_input_node): Likewise.
* ipa-inline.c (compute_inline_parameters): Compute
local.can_change_signature.
* ipa-split.c (visit_bb): Never split away APPLY_ARGS.
* tree-sra.c (ipa_sra_preliminary_function_checks): Give up on functions
that can not change signature.
* i386.c (ix86_function_regparm, ix86_function_sseregparm,
init_cumulative_args): Do not use local calling conventions for functions
that can not change signature.

Added:
branches/google/integration/gcc/testsuite/gcc.c-torture/execute/pr47237.c
Modified:
branches/google/integration/gcc/cgraph.c
branches/google/integration/gcc/cgraph.h
branches/google/integration/gcc/cgraphunit.c
branches/google/integration/gcc/config/i386/i386.c
branches/google/integration/gcc/ipa-cp.c
branches/google/integration/gcc/ipa-inline.c
branches/google/integration/gcc/ipa-split.c
branches/google/integration/gcc/lto-cgraph.c
branches/google/integration/gcc/tree-sra.c


  1   2   >