[Bug target/64424] New: cr16-elf ICE in gen_rtx_SUBREG, at emit-rtl.c:748

2014-12-28 Thread yselkowi at redhat dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64424

Bug ID: 64424
   Summary: cr16-elf ICE in gen_rtx_SUBREG, at emit-rtl.c:748
   Product: gcc
   Version: 4.9.2
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: target
  Assignee: unassigned at gcc dot gnu.org
  Reporter: yselkowi at redhat dot com
  Host: x86_64-cygwin
Target: cr16-elf
 Build: x86_64-cygwin

While compiling gcc-4.9.2 --target=cr16-elf with binutils-2.25 and newlib-2.2.0

libtool: compile: 
/usr/src/ports/cross-gcc/cross-gcc-4.9.2-1.x86_64/build/cr16-elf/./gcc/xgcc
-shared-libgcc
-B/usr/src/ports/cross-gcc/cross-gcc-4.9.2-1.x86_64/build/cr16-elf/./gcc
-nostdinc++
-L/usr/src/ports/cross-gcc/cross-gcc-4.9.2-1.x86_64/build/cr16-elf/cr16-elf/libstdc++-v3/src
-L/usr/src/ports/cross-gcc/cross-gcc-4.9.2-1.x86_64/build/cr16-elf/cr16-elf/libstdc++-v3/src/.libs
-L/usr/src/ports/cross-gcc/cross-gcc-4.9.2-1.x86_64/build/cr16-elf/cr16-elf/libstdc++-v3/libsupc++/.libs
-B/usr/cr16-elf/bin/ -B/usr/cr16-elf/lib/ -isystem /usr/cr16-elf/include
-isystem /usr/cr16-elf/sys-include
-I/usr/src/ports/cross-gcc/cross-gcc-4.9.2-1.x86_64/src/gcc-4.9.2/libstdc++-v3/../libgcc
-I/usr/src/ports/cross-gcc/cross-gcc-4.9.2-1.x86_64/build/cr16-elf/cr16-elf/libstdc++-v3/include/cr16-elf
-I/usr/src/ports/cross-gcc/cross-gcc-4.9.2-1.x86_64/build/cr16-elf/cr16-elf/libstdc++-v3/include
-I/usr/src/ports/cross-gcc/cross-gcc-4.9.2-1.x86_64/src/gcc-4.9.2/libstdc++-v3/libsupc++
-fno-implicit-templates -Wall -Wextra -Wwrite-strings -Wcast-qual -Wabi
-fdiagnostics-show-location=once -ffunction-sections -fdata-sections
-frandom-seed=ctype.lo -g -ggdb -O2 -pipe -c
/usr/src/ports/cross-gcc/cross-gcc-4.9.2-1.x86_64/src/gcc-4.9.2/libstdc++-v3/src/c++98/ctype.cc
-o ctype.o
/usr/src/ports/cross-gcc/cross-gcc-4.9.2-1.x86_64/src/gcc-4.9.2/libstdc++-v3/src/c++98/ctype.cc:
In member function ‘void std::ctype::_M_narrow_init() const’:
/usr/src/ports/cross-gcc/cross-gcc-4.9.2-1.x86_64/src/gcc-4.9.2/libstdc++-v3/src/c++98/ctype.cc:84:3:
internal compiler error: in gen_rtx_SUBREG, at emit-rtl.c:748
   }
   ^

[Bug ipa/64420] LTO can miscompile IFUNCs designated via top-level asm

2014-12-28 Thread trippels at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64420

Markus Trippelsdorf  changed:

   What|Removed |Added

 Status|UNCONFIRMED |RESOLVED
 CC||trippels at gcc dot gnu.org
 Resolution|--- |DUPLICATE

--- Comment #1 from Markus Trippelsdorf  ---
dup. Lets take the discussion there.

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


[Bug lto/57703] Assembler function definition moved to a different ltrans then call

2014-12-28 Thread trippels at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=57703

Markus Trippelsdorf  changed:

   What|Removed |Added

 CC||amonakov at gcc dot gnu.org

--- Comment #9 from Markus Trippelsdorf  ---
*** Bug 64420 has been marked as a duplicate of this bug. ***


[Bug ipa/64425] New: [5 Regression] r219076 causes 36% tramp3d slowdown

2014-12-28 Thread trippels at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64425

Bug ID: 64425
   Summary: [5 Regression] r219076 causes 36% tramp3d slowdown
   Product: gcc
   Version: 5.0
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: ipa
  Assignee: unassigned at gcc dot gnu.org
  Reporter: trippels at gcc dot gnu.org
CC: hubicka at gcc dot gnu.org

Seen on ppc64. Before r219076:

 % g++ -Ofast -w tramp3d-v4.cpp
 % ./a.out --cartvis 1.0 0.0 --rhomin 1e-8 -n 20
Time spent in iteration: 2.40742

After r219076:

 % g++ -Ofast -w tramp3d-v4.cpp
 % ./a.out --cartvis 1.0 0.0 --rhomin 1e-8 -n 20
Time spent in iteration: 3.77864


[Bug ipa/64425] [5 Regression] r219076 causes 36% tramp3d slowdown

2014-12-28 Thread trippels at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64425

--- Comment #1 from Markus Trippelsdorf  ---
On my x86_64 machine it's worse: 2.93392 vs. 5.84974.


[Bug lto/57703] Assembler function definition moved to a different ltrans then call

2014-12-28 Thread amonakov at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=57703

--- Comment #10 from Alexander Monakov  ---
Bug 64420, which was marked as a duplicate, presents an example where there's
no diagnostics at build time (linking succeeds), but the resulting code is
wrong and will fail at runtime.

I believe the correct fix would be to disable LTO partitioning in a TU that
contains top-level asms (but in that TU only).  Is there something wrong with
such approach?


[Bug c++/64422] basic_string::erase is unresloved

2014-12-28 Thread bernd.edlinger at hotmail dot de
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64422

--- Comment #2 from Bernd Edlinger  ---
Created attachment 34341
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=34341&action=edit
Proposed Fix

this fixes string::erase(iterator, iterator)
and a few more templates that are missing as well.


[Bug fortran/56867] Missing temporary with string array assignment

2014-12-28 Thread tkoenig at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=56867

--- Comment #7 from Thomas Koenig  ---
Author: tkoenig
Date: Sun Dec 28 12:03:02 2014
New Revision: 219089

URL: https://gcc.gnu.org/viewcvs?rev=219089&root=gcc&view=rev
Log:
2014-12-28  Thomas Koenig  

PR fortran/56867
* trans-array.c (gfc_conv_resolve_dependencies):  Also check
dependencies when there may be substrings of character arrays.

2014-12-28  Thomas Koenig  

PR fortran/56867
* gfortran.dg/dependency_45.f90:  New test.


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


[Bug fortran/64426] New: Unnecessary string temporary for array assignment

2014-12-28 Thread tkoenig at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64426

Bug ID: 64426
   Summary: Unnecessary string temporary for array assignment
   Product: gcc
   Version: 5.0
Status: UNCONFIRMED
  Severity: enhancement
  Priority: P3
 Component: fortran
  Assignee: unassigned at gcc dot gnu.org
  Reporter: tkoenig at gcc dot gnu.org

After the fix for PR 56867, we now create temporaries for

program main
  character(len=4) :: a
  character(len=4) :: c(3)
  c(1) = 'abcd'
  c(2) = '1234'
  c(3) = 'wxyz'
  c(:)(1:2) = c(2)(1:2)
  c(:)(1:2) = c(2)(3:4)
  if (c(3) .ne. '23yz') call abort
end program main

bug.f90:7:14:

   c(:)(1:2) = c(2)(1:2)
  1
Warning: Creating array temporary at (1) [-Warray-temporaries]
bug.f90:8:14:

   c(:)(1:2) = c(2)(3:4)
  1
Warning: Creating array temporary at (1) [-Warray-temporaries]


[Bug fortran/56867] Missing temporary with string array assignment

2014-12-28 Thread tkoenig at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=56867

--- Comment #8 from Thomas Koenig  ---
For the creation of a temporary after the fix where it is not really necessary,
see PR 64426 .


[Bug c++/64414] cc1plus: internal compiler error: Segmentation fault

2014-12-28 Thread jpyeron at pdinc dot us
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64414

--- Comment #4 from Jason Pyeron  ---
Confirming 4.9.2 does not crash, although it is a bit noisy on the output where
4.4 was quite.

Thank you.


[Bug fortran/60414] internal compiler error: tree check

2014-12-28 Thread vehre at gmx dot de
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=60414

--- Comment #6 from Andre Vehreschild  ---
I got no complains about the fix not working for someone, so at least the
status can be set to resolved.


[Bug fortran/60414] internal compiler error: tree check

2014-12-28 Thread Joost.VandeVondele at mat dot ethz.ch
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=60414

Joost VandeVondele  changed:

   What|Removed |Added

 Status|NEW |RESOLVED
 CC||Joost.VandeVondele at mat dot 
ethz
   ||.ch
 Resolution|--- |FIXED

--- Comment #7 from Joost VandeVondele  
---
Fixed for 5.0


[Bug testsuite/64427] New: gcc.target/i386/pr64291-1.c is invalid

2014-12-28 Thread hjl.tools at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64427

Bug ID: 64427
   Summary: gcc.target/i386/pr64291-1.c is invalid
   Product: gcc
   Version: 5.0
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: testsuite
  Assignee: unassigned at gcc dot gnu.org
  Reporter: hjl.tools at gmail dot com

gcc.target/i386/pr64291-1.c has

void f(void*,...);
void g(void*,long,long);
int nnn=0;
long test=0;

typedef struct
{
  int _mp_size;
  unsigned long *_mp_d;
} __mpz_struct;
typedef __mpz_struct mpz_t[1];

int main ()
{
  mpz_t n, d;
  long nn, dn;
  unsigned long *np, *dup, *dnp, *qp;
  long alloc, itch;

  f (n);
  f (d);
  qp = (unsigned long*)__builtin_alloca(4099*8) + 1;
  dnp = (unsigned long*)__builtin_alloca (2049*8);
  alloc = 1;
  for (test = 0; test < 1; test++)
{
  dn = d->_mp_size;
  dup = d->_mp_d;
  f (dnp, dup, dn);
  dnp[dn - 1] |= 1UL<<63;
  f (0);
  nn = nnn;
  np = n->_mp_d;
  qp[-1] = -757136820;
  qp[nn - dn + 1] = 14883681;
  f (0);
  if (dn >= 6)
f (0);
  itch = nn + 1;
  if (itch + 1> alloc)
{
  g(0,alloc*8,(itch+1)*8);
  alloc = itch + 1;
}
  f (np, nn);
}
  return 0;
}

and pr64291-2.c has

extern void abort (void);
void f(void*p,...){}
void g(void*p,long a,long b){if (a!=8) abort();}

Since stack variables, n and d, aren't initialized, this testcase is
invalid.


[Bug testsuite/64427] gcc.target/i386/pr64291-1.c is invalid

2014-12-28 Thread hjl.tools at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64427

H.J. Lu  changed:

   What|Removed |Added

 Status|UNCONFIRMED |NEW
   Last reconfirmed||2014-12-28
   Target Milestone|--- |5.0
 Ever confirmed|0   |1

--- Comment #1 from H.J. Lu  ---
Also, for 32-bit targets, like -m32 and -mx32, GCC complains:

/export/gnu/import/git/gcc/gcc/testsuite/gcc.target/i386/pr64291-1.c:33:25:
warning: left shift count >= width of type [-Wshift-count-overflow]


[Bug c++/64428] New: aggregate with const member as union member [C++03]

2014-12-28 Thread R.HL at gmx dot net
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64428

Bug ID: 64428
   Summary: aggregate with const member as union member [C++03]
   Product: gcc
   Version: 5.0
Status: UNCONFIRMED
  Severity: minor
  Priority: P3
 Component: c++
  Assignee: unassigned at gcc dot gnu.org
  Reporter: R.HL at gmx dot net

struct A
{
const int b;
};

union U
{
A a;
};

int main()
{
U a = {1, 1};
}

Fails to compile using -std=c++03, although it should. Consider that no special
member function apart from the destructor is implicitly defined, and the
trivialty of them is preserved.


[Bug testsuite/64427] gcc.target/i386/pr64291-1.c is invalid

2014-12-28 Thread glisse at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64427

--- Comment #2 from Marc Glisse  ---
Restricting the testcase to x86_64 would be fine with me.

As far as main is concerned, f could have written in n and d. The uninitialized
values are only passed around, it doesn't seem relevant.


[Bug c++/64429] New: Double free when returning std::string from trivial lambda

2014-12-28 Thread charlie at charliedyson dot net
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64429

Bug ID: 64429
   Summary: Double free when returning std::string from trivial
lambda
   Product: gcc
   Version: 4.8.3
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: c++
  Assignee: unassigned at gcc dot gnu.org
  Reporter: charlie at charliedyson dot net

The following causes a double free on gcc 4.8.2 as shipped with Ubuntu, and
various other versions I tested on Wandbox.

Interestingly enough, explicitly copying the string inside the lambda seems to
fix it.

Code:

#include 

using F = std::string(*)(std::string);

std::string call_fn_pointer(F f, std::string s)
{
return f(s);
}

std::string f(std::string s) { return s; }

int main()
{
// fine
call_fn_pointer(f, "foo");

// fine
call_fn_pointer([] (std::string s) { return std::string(s); }, "foo");

// double free
call_fn_pointer([] (std::string s) { return s; }, "foo");
}

Invocation:
$ g++ -std=c++1y foo.cpp -o foo -Wall
$ ./foo 
*** Error in `./foo': double free or corruption (fasttop): 0x08372008 ***
Aborted

Apologies in advance if I've found another duplicate! Could this relate to
64329?


[Bug testsuite/64427] gcc.target/i386/pr64291-1.c is invalid

2014-12-28 Thread hjl.tools at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64427

--- Comment #3 from H.J. Lu  ---
(In reply to Marc Glisse from comment #2)
> Restricting the testcase to x86_64 would be fine with me.
> 
> As far as main is concerned, f could have written in n and d. The
> uninitialized values are only passed around, it doesn't seem relevant.

There are

  mpz_t n, d;
  long nn, dn;
  unsigned long *np, *dup, *dnp, *qp;
  long alloc, itch;

  f (n);
  f (d);
  qp = (unsigned long*)__builtin_alloca(4099*8) + 1;
  dnp = (unsigned long*)__builtin_alloca (2049*8);
  alloc = 1;
  for (test = 0; test < 1; test++)
{
  dn = d->_mp_size;
  ^^
  dup = d->_mp_d;
  f (dnp, dup, dn);
  dnp[dn - 1] |= 1UL<<63;
  ^^
"dn" here contains some random value, which may be > size of dnp and
program may crash which happens with -m32 for me.


[Bug ipa/64425] [5 Regression] r219076 causes 36% tramp3d slowdown

2014-12-28 Thread hjl.tools at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64425

H.J. Lu  changed:

   What|Removed |Added

 CC||hjl.tools at gmail dot com
   Target Milestone|--- |5.0

--- Comment #2 from H.J. Lu  ---
There is also a correctness issue.  On Linux/x32, r219076 caused:

FAIL: 23_containers/unordered_set/insert/hash_policy.cc execution test
FAIL: 23_containers/unordered_set/max_load_factor/robustness.cc execution test


[Bug testsuite/64430] New: Out-of-bounds array access in isl-ast-gen-if-1.c

2014-12-28 Thread dinuxbg at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64430

Bug ID: 64430
   Summary: Out-of-bounds array access in isl-ast-gen-if-1.c
   Product: gcc
   Version: 5.0
Status: UNCONFIRMED
  Severity: minor
  Priority: P3
 Component: testsuite
  Assignee: unassigned at gcc dot gnu.org
  Reporter: dinuxbg at gmail dot com

In gcc.dg/graphite/isl-ast-gen-if-1.c:13 the following line has out-of-bounds
array access:
a[n - i] = 1;  //out-of-bounds when n=50 and i=0

Example fix:

--- a/gcc/testsuite/gcc.dg/graphite/isl-ast-gen-if-1.c
+++ b/gcc/testsuite/gcc.dg/graphite/isl-ast-gen-if-1.c
@@ -29,7 +29,7 @@ int
 main (void)
 {
   int a[50];
-  foo (a, 50);
+  foo (a, 49);


[Bug target/63304] Aarch64 pc-relative load offset out of range

2014-12-28 Thread david.abdurachmanov at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=63304

David Abdurachmanov  changed:

   What|Removed |Added

 CC||david.abdurachmanov at gmail 
dot c
   ||om

--- Comment #11 from David Abdurachmanov  
---
I believe, I hit this issue with OpenLoops package on AArch64, while it works
fine on x86_64.

It shows up on 3 of Fortran files:
scons: *** [process_obj/pplljjj/loop_pplljjj_eexddxggg_1_qp.os] Error 1
scons: *** [process_obj/pplljjj/loop_pplljjj_eexuuxggg_1_qp.os] Error 1
scons: *** [process_obj/pplljjj/loop_pplljjj_eexbbxggg_1_qp.os] Error 1

I get "Error: pc-relative load offset out of range" 864 times.

Tested with GCC 4.9.1 and binutils 2.24.

I also looked into f9edeb70961d404caac5a849b0783c53228ddf62 / 213078, with it
applied on top it gets worse, i.e. more files are affected. From 864 it
increases to 1392 errors.

This particular library (pplljjj) is 158MB on x86_64. Most of it (153MB)
belongs to .text section.

The code must be compiled with -O0 otherwise machines have hard time handling
it:

gfortran: internal compiler error: Killed (program f951)
Please submit a full bug report,
with preprocessed source if appropriate.
See  for instructions.

@Andrew,
I am happy to test your patches if necessary.


[Bug target/63442] [AArch64] ICE with ubsan/overflow-int128.c test

2014-12-28 Thread david.abdurachmanov at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=63442

David Abdurachmanov  changed:

   What|Removed |Added

 CC||david.abdurachmanov at gmail 
dot c
   ||om

--- Comment #8 from David Abdurachmanov  
---
*** Bug 64413 has been marked as a duplicate of this bug. ***


[Bug middle-end/64413] [AArch64/ARMv7] ICE in copy_to_mode_reg, at explow.c:654

2014-12-28 Thread david.abdurachmanov at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64413

David Abdurachmanov  changed:

   What|Removed |Added

 Status|UNCONFIRMED |RESOLVED
 CC||jakub at redhat dot com
 Resolution|--- |DUPLICATE

--- Comment #1 from David Abdurachmanov  
---
Worked fine with trunk. Bisecting showed that
5d098163f7aad3bed4124abc929983a620de2a82 / 216765 fixed the issue. Thus it's a
duplicate of PR 63442 ([AArch64] ICE with ubsan/overflow-int128.c test).

Applying the patch on top of GCC 4.9.1 resolved the ICE on OpenLoops 1.0.1
package.

The patch is one liner and resolves an ICE on valid code. Could I suggest RM to
have it backported for 4.9.3 release?

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


[Bug testsuite/64427] gcc.target/i386/pr64291-1.c is invalid

2014-12-28 Thread glisse at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64427

--- Comment #4 from Marc Glisse  ---
Created attachment 34342
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=34342&action=edit
Fixed testcase

Ah, sorry, I had missed dn indeed. The attached tgz runs ok under valgrind, and
fails the assertion with a compiler from before the patch.


[Bug c++/64431] New: "-Wignored-qualifiers" warning gives misleading position in code

2014-12-28 Thread rutsky.vladimir at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64431

Bug ID: 64431
   Summary: "-Wignored-qualifiers" warning gives misleading
position in code
   Product: gcc
   Version: 4.9.2
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: c++
  Assignee: unassigned at gcc dot gnu.org
  Reporter: rutsky.vladimir at gmail dot com

"type qualifiers ignored on function return type" warning doesn't point in
"const" that is being ignored, but instead it points to function arguments or
function qualifiers.

Consider following example:

$ cat ignored_qualifiers.cpp
struct C
{
const int f1();
const int f2(float);
const int f3(char *, int);
const int f4() volatile const;
const int f5() const volatile;
};

const int f6();
const int f7(float);
const int f8(char *, int);


$ g++-4.9 -c -Wignored-qualifiers ignored_qualifiers.cpp
ignored_qualifiers.cpp:3:18: warning: type qualifiers ignored on function
return type [-Wignored-qualifiers]
 const int f1();
  ^
ignored_qualifiers.cpp:4:23: warning: type qualifiers ignored on function
return type [-Wignored-qualifiers]
 const int f2(float);
   ^
ignored_qualifiers.cpp:5:29: warning: type qualifiers ignored on function
return type [-Wignored-qualifiers]
 const int f3(char *, int);
 ^
ignored_qualifiers.cpp:6:29: warning: type qualifiers ignored on function
return type [-Wignored-qualifiers]
 const int f4() volatile const;
 ^
ignored_qualifiers.cpp:7:26: warning: type qualifiers ignored on function
return type [-Wignored-qualifiers]
 const int f5() const volatile;
  ^
ignored_qualifiers.cpp:10:14: warning: type qualifiers ignored on function
return type [-Wignored-qualifiers]
 const int f6();
  ^
ignored_qualifiers.cpp:11:19: warning: type qualifiers ignored on function
return type [-Wignored-qualifiers]
 const int f7(float);
   ^
ignored_qualifiers.cpp:12:25: warning: type qualifiers ignored on function
return type [-Wignored-qualifiers]
 const int f8(char *, int);
 ^


Expected behavior: the warning should point on "const" in the return value of a
funtion.
For example:


ignored_qualifiers.cpp:7:26: warning: type qualifiers ignored on function
return type [-Wignored-qualifiers]
 const int f5() const volatile;
 ^



$ g++-4.9 --version
g++-4.9 (Ubuntu 4.9.2-0ubuntu1~14.04) 4.9.2
Copyright (C) 2014 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.


[Bug c++/64431] "-Wignored-qualifiers" warning gives misleading position in code

2014-12-28 Thread rutsky.vladimir at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64431

--- Comment #1 from Vladimir Rutsky  ---
$ g++-4.9 -v
Using built-in specs.
COLLECT_GCC=g++-4.9
COLLECT_LTO_WRAPPER=/usr/lib/gcc/x86_64-linux-gnu/4.9/lto-wrapper
Target: x86_64-linux-gnu
Configured with: ../src/configure -v --with-pkgversion='Ubuntu
4.9.2-0ubuntu1~14.04' --with-bugurl=file:///usr/share/doc/gcc-4.9/README.Bugs
--enable-languages=c,c++,java,go,d,fortran,objc,obj-c++ --prefix=/usr
--program-suffix=-4.9 --enable-shared --enable-linker-build-id
--libexecdir=/usr/lib --without-included-gettext --enable-threads=posix
--with-gxx-include-dir=/usr/include/c++/4.9 --libdir=/usr/lib --enable-nls
--with-sysroot=/ --enable-clocale=gnu --enable-libstdcxx-debug
--enable-libstdcxx-time=yes --enable-gnu-unique-object --disable-vtable-verify
--enable-plugin --with-system-zlib --disable-browser-plugin
--enable-java-awt=gtk --enable-gtk-cairo
--with-java-home=/usr/lib/jvm/java-1.5.0-gcj-4.9-amd64/jre --enable-java-home
--with-jvm-root-dir=/usr/lib/jvm/java-1.5.0-gcj-4.9-amd64
--with-jvm-jar-dir=/usr/lib/jvm-exports/java-1.5.0-gcj-4.9-amd64
--with-arch-directory=amd64 --with-ecj-jar=/usr/share/java/eclipse-ecj.jar
--enable-objc-gc --enable-multiarch --disable-werror --with-arch-32=i686
--with-abi=m64 --with-multilib-list=m32,m64,mx32 --enable-multilib
--with-tune=generic --enable-checking=release --build=x86_64-linux-gnu
--host=x86_64-linux-gnu --target=x86_64-linux-gnu
Thread model: posix
gcc version 4.9.2 (Ubuntu 4.9.2-0ubuntu1~14.04)


[Bug testsuite/64427] gcc.target/i386/pr64291-1.c is invalid

2014-12-28 Thread hjl.tools at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64427

--- Comment #5 from H.J. Lu  ---
(In reply to Marc Glisse from comment #4)
> Created attachment 34342 [details]
> Fixed testcase
> 
> Ah, sorry, I had missed dn indeed. The attached tgz runs ok under valgrind,
> and fails the assertion with a compiler from before the patch.

Since this is your test, can you fix it
directly with -m32 compilation? Thanks.


[Bug c++/64422] basic_string::erase is unresloved

2014-12-28 Thread redi at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64422

Jonathan Wakely  changed:

   What|Removed |Added

 Status|UNCONFIRMED |ASSIGNED
   Last reconfirmed||2014-12-28
   Assignee|unassigned at gcc dot gnu.org  |redi at gcc dot gnu.org
   Target Milestone|--- |5.0
 Ever confirmed|0   |1


[Bug c++/64428] aggregate with const member as union member [C++03]

2014-12-28 Thread redi at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64428

Jonathan Wakely  changed:

   What|Removed |Added

 Status|UNCONFIRMED |RESOLVED
 Resolution|--- |INVALID

--- Comment #1 from Jonathan Wakely  ---
This is not valid C++03, and not even valid C++11 due to too many initializers
in the braced-init-list.


[Bug c++/64429] Double free when returning std::string from trivial lambda

2014-12-28 Thread redi at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64429

--- Comment #1 from Jonathan Wakely  ---
More likely to be PR 62052


[Bug target/63681] ICE in cfg_layout_initialize, at cfgrtl.c:4233

2014-12-28 Thread joel at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=63681

--- Comment #4 from Joel Sherrill  ---
Since this happens on two target architectures, could someone look at it enough
to put it in the right component. It could be the same type of defect on two
different targets but it could also be a more generic problem.

Thanks.


[Bug c++/64431] "-Wignored-qualifiers" warning gives misleading position in code

2014-12-28 Thread manu at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64431

Manuel López-Ibáñez  changed:

   What|Removed |Added

   Keywords||diagnostic
 Status|UNCONFIRMED |NEW
   Last reconfirmed||2014-12-29
 CC||manu at gcc dot gnu.org
 Ever confirmed|0   |1

--- Comment #2 from Manuel López-Ibáñez  ---
This is a problem also in C, however, in C++ it is trivial to fix:

Index: gcc/cp/decl.c
===
--- gcc/cp/decl.c   (revision 218749)
+++ gcc/cp/decl.c   (working copy)
@@ -9686,11 +9686,11 @@ grokdeclarator (const cp_declarator *dec
   Make sure we have a valid type for the function to return.  */

if (type_quals != TYPE_UNQUALIFIED)
  {
if (SCALAR_TYPE_P (type) || VOID_TYPE_P (type))
- warning (OPT_Wignored_qualifiers,
+ warning_at (declspecs->locations[ds_const],
OPT_Wignored_qualifiers,
   "type qualifiers ignored on function return type");
/* We now know that the TYPE_QUALS don't apply to the
   decl, but to its return type.  */
type_quals = TYPE_UNQUALIFIED;
  }

I would suggest to add a testcase with explicit column numbers.

I added this to the list of EasyHacks and I'll leave it to a new dev to fix it
(see
https://gcc.gnu.org/wiki/GettingStarted#Basics:_Contributing_to_GCC_in_10_easy_steps
if you want to be the one)

[Bug target/64377] nios2 compile error in options-save.c

2014-12-28 Thread sandra at codesourcery dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64377

Sandra Loosemore  changed:

   What|Removed |Added

 CC||hubicka at ucw dot cz
   Assignee|sandra at codesourcery dot com |unassigned at gcc dot 
gnu.org

--- Comment #3 from Sandra Loosemore  ---
This has been discussed on the gcc-patches mailing list in this thread:

https://gcc.gnu.org/ml/gcc-patches/2014-11/msg02616.html


[Bug target/64377] nios2 compile error in options-save.c

2014-12-28 Thread sandra at codesourcery dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64377

Sandra Loosemore  changed:

   What|Removed |Added

 CC||sandra at codesourcery dot com

--- Comment #4 from Sandra Loosemore  ---
Consensus from the discussion is that the nios2 backend is *not* broken, this
is a bug in the option streaming code.  Jan Hubicka offered to fix it but I
haven't seen a patch go by yet.


[Bug target/64368] [5 Regression] Several libstdc++ test failures on darwin after r218964.

2014-12-28 Thread hp at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64368

Hans-Peter Nilsson  changed:

   What|Removed |Added

 CC||hp at gcc dot gnu.org

--- Comment #7 from Hans-Peter Nilsson  ---
cris-elf too, observed starting in r218951:218978 here, so I suggest not
hand-waving away our reports, in particular as they indicate pointer-dependent
bugs.  I haven't investigated each commit, but looking at the "svn diff
-r218951:218978" a wild guess would be a bug in the rewrite-changes perhaps
related to_GLIBCXX_USE_WCHAR_T.

If you can't see it on your system, please run the test under valgrind.

The .log entries indicate bugs consistent with the previously quoted log
entries (i.e. some allocation bug):

PASS: 22_locale/locale/cons/6.cc (test for excess errors)
core: 4 byte misaligned read to address 0xa2ce236 at 0x45788
program stopped with signal 10 (User defined signal 1).
FAIL: 22_locale/locale/cons/6.cc execution test


[Bug c++/64428] aggregate with const member as union member [C++03]

2014-12-28 Thread R.HL at gmx dot net
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64428

--- Comment #2 from R.HL at gmx dot net ---
That was a typo, I quickly modified the example before submitting it. It should
be

U u = {1};


[Bug target/64368] [5 Regression] Several libstdc++ test failures on darwin and others after r218964.

2014-12-28 Thread hp at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64368

Hans-Peter Nilsson  changed:

   What|Removed |Added

Summary|[5 Regression] Several  |[5 Regression] Several
   |libstdc++ test failures on  |libstdc++ test failures on
   |darwin after r218964.   |darwin and others after
   ||r218964.

--- Comment #8 from Hans-Peter Nilsson  ---
BTW, the ext/profile/mutex_extensions_neg.cc errors were deliberately fixed in
r218988:218990.

Also fails on i386-unknown-freebsd10.1:
 (unfortunately
no svn revision quoted but compare to
).


[Bug fortran/52010] [OOP] Intrinsic assignment of a CLASS to a TYPE

2014-12-28 Thread pault at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=52010

Paul Thomas  changed:

   What|Removed |Added

 CC||pault at gcc dot gnu.org
   Assignee|unassigned at gcc dot gnu.org  |pault at gcc dot gnu.org

--- Comment #7 from Paul Thomas  ---
My patch for PR63205 fixes the first problem. I'll have a stab at the problem
in comment #6 although it has nothing to do with the first.

Paul