[Bug middle-end/64744] ARM: gcc internal compiler error: in store_field, at expr.c:6659

2015-06-01 Thread coopht at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64744

--- Comment #6 from Alexander Basov  ---

Hi, could you please take a look at this fix:
https://gcc.gnu.org/ml/gcc-patches/2015-06/msg00027.html

It also fixes:
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=48470
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=43404


[Bug c/66373] gcc downloaded from Fedora 21 repository produces defective executable. Same source code with gcc from Fedora 19 and Fedora 20 works fine

2015-06-01 Thread jakub at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66373

--- Comment #4 from Jakub Jelinek  ---
You should try valgrind on the program, compile/link with
-fsanitize=address,undefined and see what it reports during runtime, try
different compiler options.
If you then still suspect a compiler bug, please try to turn your program into
a self-contained reproducer, see http://gcc.gnu.org/bugs/ for details.


[Bug c/66373] gcc downloaded from Fedora 21 repository produces defective executable. Same source code with gcc from Fedora 19 and Fedora 20 works fine

2015-06-01 Thread juanslayton at dslextreme dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66373

--- Comment #3 from John Slayton  ---
Yeah, this will probably have to go to redhat.  But I'll give you what I
can.  xstar.tar is the installation package for the whole program.
Dependencies are SDL2, SDL2-devel, SDL2_ttf, SDL2_ttf-devel, and freetype.
"preprocessed" was produced by gcc 4.9.2-6 (the version that fails).  I can
work up a preprocessed file from the other 2 versions if it would be of any
use.  Would take me a while, though, as it involves swapping out the hard
drives that have those versions.
js

On Mon, Jun 1, 2015 at 10:07 PM, pinskia at gcc dot gnu.org <
gcc-bugzi...@gcc.gnu.org> wrote:

> https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66373
>
> --- Comment #2 from Andrew Pinski  ---
> Can you provide the preprocessed source?  As I don't have SDL2 installed
> here.
> Also really since you are compiling with redhat's gcc, you should report
> it to
> them.
>
> --
> You are receiving this mail because:
> You reported the bug.
>


[Bug target/59593] [arm big-endian] using "ldrh" access a immediate which stored in a memory by word

2015-06-01 Thread wad at infinet dot ru
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=59593

Andrew  changed:

   What|Removed |Added

 CC||wad at infinet dot ru

--- Comment #10 from Andrew  ---

Same bug int gcc 4.9.2

Command line:
arm-rtems-gcc -S -O2 -mbig-endian testbige.c

File testbige.c:

struct test1_s
{
   unsigned short st;
};

struct test1_s f1(void)
{
  struct test1_s v = {258};
  return v;
}

Generated code:
.cpu arm7tdmi
.fpu softvfp
.eabi_attribute 20, 1
.eabi_attribute 21, 1
.eabi_attribute 23, 3
.eabi_attribute 24, 1
.eabi_attribute 25, 1
.eabi_attribute 26, 2
.eabi_attribute 30, 2
.eabi_attribute 34, 0
.eabi_attribute 18, 4
.file   "testbige.c"
.text
.align  2
.global f1
.type   f1, %function
f1:
@ Function supports interworking.
@ args = 0, pretend = 0, frame = 0
@ frame_needed = 0, uses_anonymous_args = 0
@ link register save eliminated.
ldrhr0, .L2 @ movhi
mov r0, r0, asl #16
bx  lr
.L3:
.align  2
.L2:
.word   258
.size   f1, .-f1
.ident  "GCC: (GNU) 4.9.2"


[Bug middle-end/66375] [4.8/4.9/5 Regression] wrong code at -O2 and -O3 on x86_64-linux-gnu

2015-06-01 Thread jakub at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66375

Jakub Jelinek  changed:

   What|Removed |Added

 Status|UNCONFIRMED |NEW
   Last reconfirmed||2015-06-02
 CC||jakub at gcc dot gnu.org
   Target Milestone|--- |4.8.5
Summary|wrong code at -O2 and -O3   |[4.8/4.9/5 Regression]
   |on x86_64-linux-gnu |wrong code at -O2 and -O3
   ||on x86_64-linux-gnu
 Ever confirmed|0   |1

--- Comment #2 from Jakub Jelinek  ---
Started with r185691.


[Bug middle-end/66375] wrong code at -O2 and -O3 on x86_64-linux-gnu

2015-06-01 Thread pinskia at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66375

Andrew Pinski  changed:

   What|Removed |Added

  Component|tree-optimization   |middle-end

--- Comment #1 from Andrew Pinski  ---
Works for me on aarch64-linux-gnu.


[Bug tree-optimization/66375] New: wrong code at -O2 and -O3 on x86_64-linux-gnu

2015-06-01 Thread su at cs dot ucdavis.edu
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66375

Bug ID: 66375
   Summary: wrong code at -O2 and -O3 on x86_64-linux-gnu
   Product: gcc
   Version: 6.0
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: tree-optimization
  Assignee: unassigned at gcc dot gnu.org
  Reporter: su at cs dot ucdavis.edu
  Target Milestone: ---

The current gcc trunk miscompiles the following code on x86_64-linux at -O2 and
-O3 in both 32-bit and 64-bit modes.  

It also affects gcc 4.8.x, 4.9.x and 5.1.x. This is a regression from 4.7.x.


$ gcc-trunk -v
Using built-in specs.
COLLECT_GCC=gcc-trunk
COLLECT_LTO_WRAPPER=/usr/local/gcc-trunk/libexec/gcc/x86_64-unknown-linux-gnu/6.0.0/lto-wrapper
Target: x86_64-unknown-linux-gnu
Configured with: ../gcc-trunk/configure --prefix=/usr/local/gcc-trunk
--enable-languages=c,c++ --disable-werror --enable-multilib
Thread model: posix
gcc version 6.0.0 20150601 (experimental) [trunk revision 223995] (GCC) 
$  
$ gcc-trunk -Os small.c; ./a.out
$ gcc-4.7 -O3 small.c; ./a.out
$ 
$ gcc-trunk -O2 small.c
$ ./a.out
Aborted (core dumped)
$ 


-


int a, b, c, d[6];

int
main ()
{
  c = 0;
  for (; a < 14; a++)
{
  int i = 0;
  for (; i < 6; i++)
d[i] = 11;
  char e = b = c;
  c = e - d[0];
}

  if (b != 113)
__builtin_abort();

  return 0;
}


[Bug c++/66374] New: template function accessing a temporary through a lambda

2015-06-01 Thread sebastien.alaiwan at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66374

Bug ID: 66374
   Summary: template function accessing a temporary through a
lambda
   Product: gcc
   Version: 5.1.1
Status: UNCONFIRMED
  Keywords: rejects-valid
  Severity: major
  Priority: P3
 Component: c++
  Assignee: unassigned at gcc dot gnu.org
  Reporter: sebastien.alaiwan at gmail dot com
  Target Milestone: ---

The following C++ snippet used to compile, but doesn't anymore with current gcc
trunk.

-
// simple.cpp
int getValueOfSix()
{
  return 6;
}

template
void f()
{
  auto const c = getValueOfSix();

  auto lambda = [&] ()
  {
auto a = c;
auto b = c;
  };
}

void g()
{
  f<0>();
}


[Bug c++/56926] Crash (without ICE) while compiling Boost.Math

2015-06-01 Thread asmwarrior at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=56926

--- Comment #17 from asmwarrior  ---
Good news, I can definitely confirm that enlarge the value: pch_VA_max_size can
solve the crash issue.

Luckily, the value is defined in host-mingw32.c is a const value:
static const size_t pch_VA_max_size  = 128 * 1024 * 1024;
And there are only three references in the host-mingw32.c.

Since I don't have the ability to build the gcc under windows myself, today, I
try to edit the cc1plus.exe in a binary editor.
That is: find the three references instructions in the cc1plus.exe, and edit
the instructions, so that I changed the pch_VA_max_size value from 128M to
512M.
128 * 1024 * 1024 = 128M = 08 00 00 00 (Hex)
512M = 20 00 00 00 (Hex)

To find the places where those three instructions locates, there is a trick.

I use the tool named "ollydbg" version 1.1 which is a debugger and also a
disassembler. 
Open the file cc1plus.exe, and let ollydbg show a table containing all the
calls to external modules. 


Two references is located in the function body:

static void *
mingw32_gt_pch_get_address (size_t size, int fd  ATTRIBUTE_UNUSED)
{
  void* res;
  size = (size + va_granularity - 1) & ~(va_granularity - 1);
  if (size > pch_VA_max_size)
return NULL;

  /* FIXME: We let system determine base by setting first arg to NULL.
 Allocating at top of available address space avoids unnecessary
 fragmentation of "ordinary" (malloc's)  address space but may not
 be safe  with delayed load of system dll's. Preferred addresses
 for NT system dlls is in 0x7000 to 0x7800 range.
 If we allocate at bottom we need to reserve the address as early
 as possible and at the same point in each invocation. */

  res = VirtualAlloc (NULL, pch_VA_max_size,
  MEM_RESERVE | MEM_TOP_DOWN,
  PAGE_NOACCESS);
  if (!res)
w32_error (__FUNCTION__, __FILE__, __LINE__, "VirtualAlloc");
  else
/* We do not need the address space for now, so free it.  */
VirtualFree (res, 0, MEM_RELEASE);

  return res; 
}

Then, you can search the calling table by "VirtualAlloc" from the table, you
will find only one match, then go the address of the calling instruction, you
can easily find the two instructions which has "0008" in the instructions.
Then, change the last byte to "20", note that "0020" is in fact 20 00 00 00
which is 512M because x86 cpu uses little endian.

The third place can be found in the function body:

static int
mingw32_gt_pch_use_address (void *addr, size_t size, int fd,
size_t offset)
{
  void * mmap_addr;
  HANDLE mmap_handle;

  /* Apparently, MS Vista puts unnamed file mapping objects into Global
 namespace when running an application in a Terminal Server
 session.  This causes failure since, by default, applications 
 don't get SeCreateGlobalPrivilege. We don't need global
 memory sharing so explicitly put object into Local namespace.

 If multiple concurrent GCC processes are using PCH functionality,
 MapViewOfFileEx returns "Access Denied" error.  So we ensure the
 session-wide mapping name is unique by appending process ID.  */

#define OBJECT_NAME_FMT "Local\\MinGWGCCPCH-"

  char* object_name = NULL;
  /* However, the documentation for CreateFileMapping says that on NT4
 and earlier, backslashes are invalid in object name.  So, we need
 to check if we are on Windows2000 or higher.  */
  OSVERSIONINFO version_info;
  int r;

  version_info.dwOSVersionInfoSize = sizeof (version_info);

  if (size == 0)
return 0; 

  /* Offset must be also be a multiple of allocation granularity for
 this to work.  We can't change the offset. */ 
  if ((offset & (va_granularity - 1)) != 0 || size > pch_VA_max_size)
return -1;


  /* Determine the version of Windows we are running on and use a
 uniquely-named local object if running > 4.  */
  GetVersionEx (&version_info);

Now, search for the function call of "GetVersionEx", you can easily find and
change the instruction.


The total changes can be listed in the patch window of ollydbg, see the screen
shot
http://imagizer.imageshack.us/v2/689x223q90/673/xL8rmw.png
(The cc1plus.exe I used to modify is the one I tested in comment 11)
Then, you can save the modified cc1plus.exe, and now, it can handle larger pch
file up to 512M.

Good luck.


[Bug c/66373] gcc downloaded from Fedora 21 repository produces defective executable. Same source code with gcc from Fedora 19 and Fedora 20 works fine

2015-06-01 Thread pinskia at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66373

--- Comment #2 from Andrew Pinski  ---
Can you provide the preprocessed source?  As I don't have SDL2 installed here. 
Also really since you are compiling with redhat's gcc, you should report it to
them.


[Bug c/66373] gcc downloaded from Fedora 21 repository produces defective executable. Same source code with gcc from Fedora 19 and Fedora 20 works fine

2015-06-01 Thread juanslayton at dslextreme dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66373

--- Comment #1 from John Slayton  ---
reference to xp.c should be xs.c


[Bug c/66373] New: gcc downloaded from Fedora 21 repository produces defective executable. Same source code with gcc from Fedora 19 and Fedora 20 works fine

2015-06-01 Thread juanslayton at dslextreme dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66373

Bug ID: 66373
   Summary: gcc downloaded from Fedora 21 repository produces
defective executable.  Same source code with gcc from
Fedora 19 and Fedora 20 works fine
   Product: gcc
   Version: unknown
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: c
  Assignee: unassigned at gcc dot gnu.org
  Reporter: juanslayton at dslextreme dot com
  Target Milestone: ---

Created attachment 35675
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=35675&action=edit
source code and 3 compilations from different gcc versions

In the attached files, xs.c is the source file for a program that polls 40 USB
keyboards (the “student keyboards”) and does various things with any input that
it finds.  Files a, b, and c are executable files produced by 3 different
editions of gcc downloaded from Fedora repositories.  Each was compiled with
“gcc -Wall -Wextra -lSDL2 -lrt -lSDL2_ttf -O3 xs.c”.  Each compilation was
clean, with no errors or warnings.

Files a and b work beautifully.  File c misbehaves in such a way as to render
the program unusable.  Under the circumstances, suspicion falls on the latest
edition of gcc as downloaded from the Fedora 21 repository.

Here are the specifics.

File a was compiled with Fedora 19, gcc version 4.8.2 20131212 (Red Hat
4.8.2-7)

File b was compiled with Fedora 20, gcc version 4.8.3 20140911 (Red Hat
4.8.3-7)

File c was compiled with Fedora 21, gcc version 4.9.2 20150212 (Red Hat
4.9.2-6)

The failure seems to be on a return from subroutine get_event, lines  2919ff,
of xp.c  This subroutine is called to read keystrokes from student boards and
return them to the calling routines.  There are 7 such routines; four present
math facts drills, one gives keyboarding practice, one gives advice on written
work from a textbook, and one is a rudimentary word processor.  They process
returns from get_event in various ways, but the run time error is the same for
each of them, which points to get_event as the error location.  This is not a
sure thing, and it could be that whatever the error is, it could be duplicated
in each of the 7 calling routines.  

The error is this, when get_event returns 10, (ie, ‘enter’ has been pushed) the
program jumps to the primary program menu, rather than continuing the routine
that called get_event.  Whether it does this by going through that routine, or
by somehow going around it, I haven’t yet determined.  But the fact that only
compilations under the latest gcc edition show this behavior,  suggests a bug
in the compiler.  I can’t imagine what it would be.

[Bug c++/66350] typename should be forbidden in inhering constructors

2015-06-01 Thread msebor at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66350

--- Comment #3 from Martin Sebor  ---
You're right.  My Clang test case wasn't quite the same.  Recent trunk does
fail to compile it.


[Bug c++/66350] typename should be forbidden in inhering constructors

2015-06-01 Thread vgheorgh at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66350

--- Comment #2 from Vlad Gheorghiu  ---
(In reply to Martin Sebor from comment #1)
> Here's a reduced test case compiled with -Wall in C++ 98 mode:
> 
>   $ cat t.cpp && ~/bin/gcc-5.1.0/bin/g++ -Wall -std=c++98 -c t.cpp
>   template  struct A { A (T) { } };
>   template  struct B: A {
>   using typename A::A;
>   };
> 
>   B b (0);
>   t.cpp:3:26: warning: inheriting constructors only available with
> -std=c++11 or -std=gnu++11
>using typename A::A;
>   ^
> I don't think gcc is incorrect in accepting the code either in C++ 98 mode
> as an extension, or in C++ 11 mode.  In the latter mode, accepting it is in
> keeping with the resolution of DR 147. Naming the constructor  (Clang
> accepts the test case above in C++ 11 mode).  That is, when 'A::A'
> nominates class template A the name is instead taken to name the ctor of A.

I tried compiling your test with Clang but it fails with the same error,
http://melpon.org/wandbox/permlink/7sGeB2XfPOHkOFfN


[Bug c++/66350] typename should be forbidden in inhering constructors

2015-06-01 Thread msebor at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66350

Martin Sebor  changed:

   What|Removed |Added

 CC||msebor at gcc dot gnu.org

--- Comment #1 from Martin Sebor  ---
Here's a reduced test case compiled with -Wall in C++ 98 mode:

  $ cat t.cpp && ~/bin/gcc-5.1.0/bin/g++ -Wall -std=c++98 -c t.cpp
  template  struct A { A (T) { } };
  template  struct B: A {
  using typename A::A;
  };

  B b (0);
  t.cpp:3:26: warning: inheriting constructors only available with -std=c++11
or -std=gnu++11
   using typename A::A;
  ^
I don't think gcc is incorrect in accepting the code either in C++ 98 mode as
an extension, or in C++ 11 mode.  In the latter mode, accepting it is in
keeping with the resolution of DR 147. Naming the constructor  (Clang accepts
the test case above in C++ 11 mode).  That is, when 'A::A' nominates class
template A the name is instead taken to name the ctor of A.


[Bug tree-optimization/62173] [5/6 Regression] 64bit Arch can't ivopt while 32bit Arch can

2015-06-01 Thread amker at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=62173

--- Comment #39 from amker at gcc dot gnu.org ---
Author: amker
Date: Tue Jun  2 03:33:35 2015
New Revision: 224009

URL: https://gcc.gnu.org/viewcvs?rev=224009&root=gcc&view=rev
Log:

PR tree-optimization/52563
PR tree-optimization/62173
* tree-ssa-loop-ivopts.c (struct iv): New field.  Reorder fields.
(alloc_iv, set_iv): New parameter.
(determine_biv_step): Delete.
(find_bivs): Inline original determine_biv_step.  Pass new
argument to set_iv.
(idx_find_step): Use no_overflow information for conversion.
* tree-scalar-evolution.c (analyze_scalar_evolution_in_loop): Let
resolve_mixers handle folded_casts.
(instantiate_scev_name): Change bool parameter to bool pointer.
(instantiate_scev_poly, instantiate_scev_binary): Ditto.
(instantiate_array_ref, instantiate_scev_not): Ditto.
(instantiate_scev_3, instantiate_scev_2): Ditto.
(instantiate_scev_1, instantiate_scev_r): Ditto.
(instantiate_scev_convert, ): Change parameter.  Pass argument
to chrec_convert_aggressive.
(instantiate_scev): Change argument.
(resolve_mixers): New parameter and set it.
(scev_const_prop): New argument.
* tree-scalar-evolution.h (resolve_mixers): New parameter.
* tree-chrec.c (convert_affine_scev): Call chrec_convert instead
of chrec_conert_1.
(chrec_convert): New parameter.  Move definition below.
(chrec_convert_aggressive): New parameter and set it.  Call
convert_affine_scev.
* tree-chrec.h (chrec_convert): New parameter.
(chrec_convert_aggressive): Ditto.

gcc/testsuite/ChangeLog
PR tree-optimization/52563
PR tree-optimization/62173
* gcc.dg/tree-ssa/scev-3.c: Remove xfail.
* gcc.dg/tree-ssa/scev-4.c: Ditto.


Modified:
trunk/gcc/ChangeLog
trunk/gcc/testsuite/ChangeLog
trunk/gcc/testsuite/gcc.dg/tree-ssa/scev-3.c
trunk/gcc/testsuite/gcc.dg/tree-ssa/scev-4.c
trunk/gcc/tree-chrec.c
trunk/gcc/tree-chrec.h
trunk/gcc/tree-scalar-evolution.c
trunk/gcc/tree-scalar-evolution.h
trunk/gcc/tree-ssa-loop-ivopts.c


[Bug testsuite/52563] FAIL: gcc.dg/tree-ssa/scev-[3,4].c scan-tree-dump-times optimized "&a" 1

2015-06-01 Thread amker at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=52563

--- Comment #9 from amker at gcc dot gnu.org ---
Author: amker
Date: Tue Jun  2 03:33:35 2015
New Revision: 224009

URL: https://gcc.gnu.org/viewcvs?rev=224009&root=gcc&view=rev
Log:

PR tree-optimization/52563
PR tree-optimization/62173
* tree-ssa-loop-ivopts.c (struct iv): New field.  Reorder fields.
(alloc_iv, set_iv): New parameter.
(determine_biv_step): Delete.
(find_bivs): Inline original determine_biv_step.  Pass new
argument to set_iv.
(idx_find_step): Use no_overflow information for conversion.
* tree-scalar-evolution.c (analyze_scalar_evolution_in_loop): Let
resolve_mixers handle folded_casts.
(instantiate_scev_name): Change bool parameter to bool pointer.
(instantiate_scev_poly, instantiate_scev_binary): Ditto.
(instantiate_array_ref, instantiate_scev_not): Ditto.
(instantiate_scev_3, instantiate_scev_2): Ditto.
(instantiate_scev_1, instantiate_scev_r): Ditto.
(instantiate_scev_convert, ): Change parameter.  Pass argument
to chrec_convert_aggressive.
(instantiate_scev): Change argument.
(resolve_mixers): New parameter and set it.
(scev_const_prop): New argument.
* tree-scalar-evolution.h (resolve_mixers): New parameter.
* tree-chrec.c (convert_affine_scev): Call chrec_convert instead
of chrec_conert_1.
(chrec_convert): New parameter.  Move definition below.
(chrec_convert_aggressive): New parameter and set it.  Call
convert_affine_scev.
* tree-chrec.h (chrec_convert): New parameter.
(chrec_convert_aggressive): Ditto.

gcc/testsuite/ChangeLog
PR tree-optimization/52563
PR tree-optimization/62173
* gcc.dg/tree-ssa/scev-3.c: Remove xfail.
* gcc.dg/tree-ssa/scev-4.c: Ditto.


Modified:
trunk/gcc/ChangeLog
trunk/gcc/testsuite/ChangeLog
trunk/gcc/testsuite/gcc.dg/tree-ssa/scev-3.c
trunk/gcc/testsuite/gcc.dg/tree-ssa/scev-4.c
trunk/gcc/tree-chrec.c
trunk/gcc/tree-chrec.h
trunk/gcc/tree-scalar-evolution.c
trunk/gcc/tree-scalar-evolution.h
trunk/gcc/tree-ssa-loop-ivopts.c


[Bug tree-optimization/66372] New: ICE on valid code at -O3 on x86_64-linux-gnu

2015-06-01 Thread su at cs dot ucdavis.edu
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66372

Bug ID: 66372
   Summary: ICE on valid code at -O3 on x86_64-linux-gnu
   Product: gcc
   Version: 6.0
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: tree-optimization
  Assignee: unassigned at gcc dot gnu.org
  Reporter: su at cs dot ucdavis.edu
  Target Milestone: ---

The following code causes an ICE when compiled with the current gcc trunk at
-O3 on x86_64-linux-gnu in both 32-bit and 64-bit modes. 

It is a regression from 5.1.x. 


$ gcc-trunk -v
Using built-in specs.
COLLECT_GCC=gcc-trunk
COLLECT_LTO_WRAPPER=/usr/local/gcc-trunk/libexec/gcc/x86_64-unknown-linux-gnu/6.0.0/lto-wrapper
Target: x86_64-unknown-linux-gnu
Configured with: ../gcc-trunk/configure --prefix=/usr/local/gcc-trunk
--enable-languages=c,c++ --disable-werror --enable-multilib
Thread model: posix
gcc version 6.0.0 20150601 (experimental) [trunk revision 223995] (GCC) 
$ 
$ gcc-trunk -O2 small.c; ./a.out
$ gcc-5.1 -O3 small.c; ./a.out
$ 
$ gcc-trunk -O3 small.c
small.c: In function ‘main’:
small.c:29:1: internal compiler error: Segmentation fault
 main ()
 ^
0xb1212f crash_signal
../../gcc-trunk/gcc/toplev.c:380
0xcf4811 thread_through_all_blocks(bool)
../../gcc-trunk/gcc/tree-ssa-threadupdate.c:2693
0xc3310b execute
../../gcc-trunk/gcc/tree-ssa-dom.c:1244
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.
$ 





int a, c, d, e, f;

int
fn1 ()
{
  for (;;)
{
  if (a)
break;
  unsigned int g = 1;
lbl:
  c = g;
  for (g = 0; g < 1; g++)
{
  if (c)
continue;
  int h[1];
  f = h[0];
  for (; d; d = 0)
if (e)
  goto lbl;
}
  return 0;
}
  return 0;
}

int
main ()
{
  fn1 ();
  return 0;
}

[Bug c++/66371] New: ICE: canonical types differ for identical types

2015-06-01 Thread jamrial at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66371

Bug ID: 66371
   Summary: ICE: canonical types differ for identical types
   Product: gcc
   Version: 6.0
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: c++
  Assignee: unassigned at gcc dot gnu.org
  Reporter: jamrial at gmail dot com
  Target Milestone: ---

Created attachment 35674
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=35674&action=edit
Preprocessed source as generated by -freport-bug

GCC 6.0.0 svn 223906

In file included from
/home/jamrial/range-v3/include/range/v3/range_interface.hpp:25:0,
 from
/home/jamrial/range-v3/include/range/v3/range_facade.hpp:21,
 from /home/jamrial/range-v3/include/range/v3/core.hpp:21,
 from /home/jamrial/range-v3/test/container_conversion.cpp:17:
/home/jamrial/range-v3/include/range/v3/to_container.hpp: In instantiation of
‘struct ranges::v3::detail::to_container_fn >
>’:
/home/jamrial/range-v3/include/range/v3/to_container.hpp:143:62:   required
from ‘Cont ranges::v3::to_(Rng&&) [with Cont = std::vector; Rng =
ranges::v3::take_exactly_view&; int
_concept_requires_140 = 42; typename std::enable_if<((_concept_requires_140 ==
43) || (ranges::v3::Range() &&
ranges::v3::detail::ConvertibleToContainer())), int>::type
 = 0]’
/home/jamrial/range-v3/include/range/v3/range_interface.hpp:240:46:   required
from ‘ranges::v3::range_interface >::operator Container()
[with Container = std::vector; D =
ranges::v3::take_exactly_view; Alloc =
std::allocator; int _concept_requires_237 = 42; typename
std::enable_if<((_concept_requires_237 == 43) ||
ranges::v3::detail::ConvertibleToContainer()), int>::type
 = 0; Derived =
ranges::v3::take_exactly_view;
ranges::v3::cardinality Cardinality = (ranges::v3::cardinality)-1]’
/home/jamrial/range-v3/test/container_conversion.cpp:31:52:   required from
here
/home/jamrial/range-v3/include/range/v3/to_container.hpp:74:22: internal
compiler error: canonical types differ for identical types
std::enable_if<((_concept_requires_73 == 43) || ((ranges::v3::Range() &&
ranges::v3::detail::ConvertibleToContainer >()) &&
ranges::v3::detail::to_container_fn >
>::ReserveConcept())), int> and
std::enable_if<((_concept_requires_73 == 43) || ((ranges::v3::Range() &&
ranges::v3::detail::ConvertibleToContainer >()) &&
ranges::v3::detail::to_container_fn
>::ReserveConcept())), int>
 Cont impl(Rng && rng, std::true_type) const
  ^
0x738b8e comptypes(tree_node*, tree_node*, int)
/home/jamrial/gcc-svn/gcc/cp/typeck.c:1423
0x737610 structural_comptypes
/home/jamrial/gcc-svn/gcc/cp/typeck.c:1338
0x66e122 reduce_template_parm_level
/home/jamrial/gcc-svn/gcc/cp/pt.c:3704
0x66a120 tsubst(tree_node*, tree_node*, int, tree_node*)
/home/jamrial/gcc-svn/gcc/cp/pt.c:12155
0x670e50 tsubst_copy
/home/jamrial/gcc-svn/gcc/cp/pt.c:13054
0x676056 tsubst_copy_and_build(tree_node*, tree_node*, int, tree_node*, bool,
bool)
/home/jamrial/gcc-svn/gcc/cp/pt.c:15728
0x65b6b0 tsubst_expr
/home/jamrial/gcc-svn/gcc/cp/pt.c:14393
0x66bf6b tsubst_template_arg
/home/jamrial/gcc-svn/gcc/cp/pt.c:9690
0x666a42 tsubst_template_args
/home/jamrial/gcc-svn/gcc/cp/pt.c:10241
0x666d3a tsubst_template_args
/home/jamrial/gcc-svn/gcc/cp/pt.c:10201
0x660342 tsubst_decl
/home/jamrial/gcc-svn/gcc/cp/pt.c:10624
0x669f4e tsubst(tree_node*, tree_node*, int, tree_node*)
/home/jamrial/gcc-svn/gcc/cp/pt.c:11819
0x68de6b instantiate_class_template_1
/home/jamrial/gcc-svn/gcc/cp/pt.c:9357
0x68de6b instantiate_class_template(tree_node*)
/home/jamrial/gcc-svn/gcc/cp/pt.c:9671
0x7336fb complete_type(tree_node*)
/home/jamrial/gcc-svn/gcc/cp/typeck.c:146
0x7338ef complete_type_or_maybe_complain(tree_node*, tree_node*, int)
/home/jamrial/gcc-svn/gcc/cp/typeck.c:158
0x7339d9 require_complete_type_sfinae(tree_node*, int)
/home/jamrial/gcc-svn/gcc/cp/typeck.c:102
0x5ec059 build_cxx_call(tree_node*, int, tree_node**, int)
/home/jamrial/gcc-svn/gcc/cp/call.c:7652
0x5f1701 build_over_call
/home/jamrial/gcc-svn/gcc/cp/call.c:7567
0x600471 build_new_function_call(tree_node*, vec**, bool, int)
/home/jamrial/gcc-svn/gcc/cp/call.c:4100

New version of the first file reported in pr66067, this time with a different
ICE.

[Bug c++/44282] fastcall is not mangled at all

2015-06-01 Thread jason at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=44282

--- Comment #8 from Jason Merrill  ---
Author: jason
Date: Tue Jun  2 02:28:19 2015
New Revision: 224007

URL: https://gcc.gnu.org/viewcvs?rev=224007&root=gcc&view=rev
Log:
PR c++/44282
gcc/cp/
* mangle.c (attr_strcmp): New.
(write_CV_qualifiers_for_type): Also write out attributes that
affect type identity.
(write_type): Strip all attributes after writing qualifiers.
libiberty/
* cp-demangle.c (cplus_demangle_type): Handle arguments to vendor
extended qualifier.

Added:
trunk/gcc/testsuite/g++.dg/abi/mangle-regparm.C
Modified:
trunk/gcc/c-family/c-opts.c
trunk/gcc/common.opt
trunk/gcc/cp/ChangeLog
trunk/gcc/cp/mangle.c
trunk/gcc/testsuite/g++.dg/abi/macro0.C
trunk/libiberty/ChangeLog
trunk/libiberty/cp-demangle.c
trunk/libiberty/testsuite/demangle-expected


[Bug libstdc++/65942] [5/6 Regression] [C++14] cannot use std::function as comparator in algorithms

2015-06-01 Thread jason at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=65942

--- Comment #13 from Jason Merrill  ---
Author: jason
Date: Tue Jun  2 02:28:25 2015
New Revision: 224008

URL: https://gcc.gnu.org/viewcvs?rev=224008&root=gcc&view=rev
Log:
PR c++/65942
* decl2.c (mark_used): Don't always instantiate constexpr fns.
* constexpr.c (cxx_eval_call_expression): Instantiate them here.

Added:
trunk/gcc/testsuite/g++.dg/cpp0x/constexpr-decltype2.C
Modified:
trunk/gcc/cp/ChangeLog
trunk/gcc/cp/constexpr.c
trunk/gcc/cp/decl2.c


[Bug objc/66367] Objective-C Variadic Method Not Compiling

2015-06-01 Thread pinskia at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66367

--- Comment #3 from Andrew Pinski  ---
(In reply to Chris Loonam from comment #2)
> I think that being able to use `id` as an argument to va_arg is the expected
> behavior, not an extension provided by the compiler.

This has nothing to do with id but rather variable arguments is not being
parsed as it is not supported yet.

Variadic have not implemented in the objective-C front-end of GCC.  And that is
why it is an extension to the language.


[Bug objc/66367] Objective-C Variadic Method Not Compiling

2015-06-01 Thread chrisloonam at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66367

--- Comment #2 from Chris Loonam  ---
I think that being able to use `id` as an argument to va_arg is the expected
behavior, not an extension provided by the compiler.


[Bug tree-optimization/59124] [4.8/4.9/5/6 Regression] Wrong warnings "array subscript is above array bounds"

2015-06-01 Thread daniel at imperfectcode dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=59124

daniel at imperfectcode dot com changed:

   What|Removed |Added

 CC||daniel at imperfectcode dot com

--- Comment #15 from daniel at imperfectcode dot com ---
FYI, I'm seeing a similar error on Arch Linux using 5.1.0.
== Build lib/librte_eal/linuxapp/eal
  CC eal.o
  CC eal_hugepage_info.o
  CC eal_memory.o
.../dpdk-2.0.0/lib/librte_eal/linuxapp/eal/eal_memory.c: In function
‘rte_eal_hugepage_init’:
.../dpdk-2.0.0/lib/librte_eal/linuxapp/eal/eal_memory.c:1193:35: error: array
subscript is above array bounds [-Werror=array-bounds]
  internal_config.hugepage_info[j].hugepage_sz) {
   ^
.../dpdk-2.0.0/lib/librte_eal/linuxapp/eal/eal_memory.c:1198:34: error: array
subscript is above array bounds [-Werror=array-bounds]
 internal_config.hugepage_info[j].num_pages[socket]++;
  ^
.../dpdk-2.0.0/lib/librte_eal/linuxapp/eal/eal_memory.c:1198:34: error: array
subscript is above array bounds [-Werror=array-bounds]
cc1: all warnings being treated as errors
.../dpdk-2.0.0/mk/internal/rte.compile-pre.mk:126: recipe for target
'eal_memory.o' failed
[...]

[Bug objc/66367] Objective-C Variadic Method Not Compiling

2015-06-01 Thread pinskia at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66367

Andrew Pinski  changed:

   What|Removed |Added

   Severity|normal  |enhancement

--- Comment #1 from Andrew Pinski  ---
Clang implements some extensions on top of objective-c that gcc implements.
This is an enchancement request.


[Bug go/66368] [5 Regression] go tool crashes on powerpc-linux-gnu

2015-06-01 Thread doko at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66368

--- Comment #1 from Matthias Klose  ---
correction: reverting the changes from PR65787 only helps for the 5.1.0
release, not the gcc-5-branch.


[Bug libstdc++/66030] [5.1.0] std::codecvt_byname missing from libstdc++ DLL

2015-06-01 Thread redi at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66030

Jonathan Wakely  changed:

   What|Removed |Added

 Status|NEW |ASSIGNED
   Assignee|unassigned at gcc dot gnu.org  |redi at gcc dot gnu.org

--- Comment #8 from Jonathan Wakely  ---
OK, thanks for checking. I'll prepare a new patch tomorrow.


[Bug target/66358] [5/6 Regression] [SH] ICE: in extract_constrain_insn, at recog.c:2232

2015-06-01 Thread kkojima at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66358

--- Comment #5 from Kazumoto Kojima  ---
Created attachment 35673
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=35673&action=edit
original test case

My sh-elf compiler

COLLECT_GCC=../xsh-elf-combined/build/gcc/xgcc
Target: sh-unknown-elf
Configured with: /exp/ldroot/dodes/xsh-elf-combined/combined/configure
--target=sh-unknown-elf --disable-libssp --disable-libgomp
--disable-libstdcxx-pch --with-gnu-as --with-gnu-ld --enable-languages=c,c++
--disable-shared --with-newlib --disable-nls
--prefix=/exp/ldroot/dodes/xsh-elf-combined/install --with-headers=yes
--disable-gdbtk --with-mpfr=/opt2/i686-pc-linux-gnu
--with-gmp=/opt2/i686-pc-linux-gnu --without-libgloss
Thread model: single
gcc version 6.0.0 20150531 (experimental) (GCC) 

can reproduce it with -O2 -fpic -m4 -ml, though the bug looks a bit
fragile like as other RA related bugs.  I've attached unreduced test
case.  sh-elf compiler ICEs for this test case even with -O2 only here.


[Bug libstdc++/66354] [UBSAN] stl_algobase.h:708:7: runtime error: null pointer passed as argument

2015-06-01 Thread redi at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66354

Jonathan Wakely  changed:

   What|Removed |Added

 Status|RESOLVED|ASSIGNED
 Resolution|FIXED   |---

--- Comment #6 from Jonathan Wakely  ---
Reopening as I plan to fix this on other branches too.


[Bug target/62308] A bug with aarch64 big-endian

2015-06-01 Thread clyon at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=62308

--- Comment #12 from Christophe Lyon  ---
(In reply to Vladimir Makarov from comment #11)
> (In reply to Christophe Lyon from comment #10)
> > Hello Vladimir,
> > Have you been able to make progress on this bug?
> 
> Thanks for the remainder, Cristophe.  Sometimes I am loosing track of bugs I
> should work on as I have to many of them.
> 
> I checked gcc-4.9-branch and the test.  I believe the patch mentioned for
> rev. 215707 is the right solution.  It could be a bit different but it has
> no sense to try something else as the patch had already good testing and
> proved by time.
> 
> So you can submit the patch into gcc-4.9-branch after standard procedure
> (bootstrap at least on x86-64 and aarch64 and testing on the both platform).
> I approve it.

The patch applies cleanly to the 4.9-branch.

However, I am probably missing something since with an updated 4.9-branch and
without this patch, I couldn't make the compiler crash:
$ aarch64-unknown-linux-gnu-gcc -S test.c -mbig-endian
test.c:2:15: error: expected specifier-qualifier-list before ‘v4si’
 struct S2823 {v4si a;int b[0];};

[Bug c/66370] New: compiler crashes when compiling a function with a huge number of arguments

2015-06-01 Thread jcarbaut at hotmail dot fr
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66370

Bug ID: 66370
   Summary: compiler crashes when compiling a function with a huge
number of arguments
   Product: gcc
   Version: unknown
Status: UNCONFIRMED
  Severity: minor
  Priority: P3
 Component: c
  Assignee: unassigned at gcc dot gnu.org
  Reporter: jcarbaut at hotmail dot fr
  Target Milestone: ---

This happens with the mingw-w64 distribution on Windows 7, with gcc-4.9.2, 64
bits.

I make a "fake" function with many arguments, with the following python script.
The function computes the sum of its arguments, which are all of type long. The
result is also of type long.
The variable "n" in the python script is the number of arguments. The output is
sent to a C file, which is then compiled.

n = 10907
for i in [n]:
print("long f(")
s = "return"
for j in range(1, 1 + i):
if j == i:
print("long a%x) {" % j)
s += " a%x;" % j
print("%s\n}" % s)
else:
print("long a%x," % j)
s += " a%x + \n" % j

With "gcc -c" (that is, no optimization), the compilation runs without a
problem for n<28040 and crashes for n=28040 or larger.

With "gcc -c -O1" or any higher level of optimization, the compilation runs for
n<10907 and crashes for n=10907 or larger.

While this function is utterly useless, it may show some bug in the compiler,
since, I guess, it's not supposed to crash on weird input. It's a kind, a very
trivial kind, of stress test for the compiler.


[Bug c/66369] gcc 4.8.3/5.1.0 miss optimisation with vpmovmskb

2015-06-01 Thread marcus.kool at urlfilterdb dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66369

Marcus Kool  changed:

   What|Removed |Added

   Keywords||missed-optimization
  Known to fail||4.8.3, 5.1.0
   Severity|normal  |minor


[Bug c/66369] New: gcc 4.8.3/5.1.0 miss optimisation with vpmovmskb

2015-06-01 Thread marcus.kool at urlfilterdb dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66369

Bug ID: 66369
   Summary: gcc 4.8.3/5.1.0 miss optimisation with vpmovmskb
   Product: gcc
   Version: 4.8.3
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: c
  Assignee: unassigned at gcc dot gnu.org
  Reporter: marcus.kool at urlfilterdb dot com
  Target Milestone: ---

Created attachment 35672
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=35672&action=edit
example C code to demonstrate the missed optimisation in gcc 4.8.3 and 5.1.0

When using _mm256_movemask_epi8() I cannot find a way for gcc to produce
   vpmovmskb YMM,R64
instead of 
   vpmovmskb YMM,R32

When the result of the vpmovmskb is not stored in R64, unnecessary
sign-extension instructions cltq, movl or movslq are generated later.  With a
result in R32 and indexing an array of structs, gcc generates for 
   node = node->children[ __builtin_ctzl(result-of-vpmovmskb) ]
the following:
   vpmovmskb YMM,R32
   movslqR32, R64
   tzcntqR64, R64
   movq  offset(%rdi,R64,8), %rdi
instead of the more efficient:
   vpmovmskb YMM,R64
   tzcntqR64,R64
   movq  offset(%rdi,R64,8), %rdi

Attached is avx2.c which has the C source code that demonstrates the above.
aavx2.c is compiled with gcc (GCC) 4.8.3 20140911 (Red Hat 4.8.3-9) and flags
   -std=c99 -march=core-avx2  -mtune=core-avx2 -O3
gcc 5.1.0 has the same behaviour.


[Bug go/66368] New: [5 Regression] go tool crashes on powerpc-linux-gnu

2015-06-01 Thread doko at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66368

Bug ID: 66368
   Summary: [5 Regression] go tool crashes on powerpc-linux-gnu
   Product: gcc
   Version: 5.0
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: go
  Assignee: ian at airs dot com
  Reporter: doko at gcc dot gnu.org
CC: cmang at google dot com
  Target Milestone: ---

"go version" on powerpc-linux-gnu works with the 5.1 release candidate, but
crashes with the 5.1.0 release, and the current branch.

reverting the changes made in PR65787 fixes the issue. Seen on Ubuntu 15.04 and
15.10 systems, however I can't reproduce this in Debian unstable. Same binutils
version, Debian has glibc-2.19, Ubuntu glibc-2.21.  It looks like I can't
reproduce this with a GCC trunk build on either platform. So I'm a bit lost ...

$ go version
fatal error: unexpected signal during runtime execution
[signal 0xb code=0x1 addr=0x3]

goroutine 16 [running]:
runtime_dopanic
../../../src/libgo/runtime/panic.c:131
runtime_throw
../../../src/libgo/runtime/panic.c:193
sig_panic_leadin
../../../src/libgo/runtime/go-signal.c:247
sig_panic_info_handler
../../../src/libgo/runtime/go-signal.c:281

:0
__go_go
../../../src/libgo/runtime/proc.c:2328
runtime_main
../../../src/libgo/runtime/proc.c:598

goroutine 0 [idle]:
panic during panic

goroutine 0 [idle]:
runtime_dopanic
../../../src/libgo/runtime/panic.c:131
runtime_startpanic
../../../src/libgo/runtime/panic.c:100
runtime_throw
../../../src/libgo/runtime/panic.c:191
runtime_gogo
../../../src/libgo/runtime/proc.c:251
runtime_tracebackothers
../../../src/libgo/runtime/proc.c:767
runtime_dopanic
../../../src/libgo/runtime/panic.c:139
runtime_throw
../../../src/libgo/runtime/panic.c:193
sig_panic_leadin
../../../src/libgo/runtime/go-signal.c:247
sig_panic_info_handler
../../../src/libgo/runtime/go-signal.c:281

:0
__go_go
../../../src/libgo/runtime/proc.c:2328
runtime_main
../../../src/libgo/runtime/proc.c:598


[Bug target/66275] __attribute__((sysv_abi)) with x86_64-w64-mingw32-gcc generates incorrect code

2015-06-01 Thread ubizjak at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66275

--- Comment #5 from Uroš Bizjak  ---
Kai, can you please test the patch on x86_64-w64-mingw32 ?

The patch has been bootstrapped and regression tested on x86_64-linux-gnu, but
there is the comment which I'm not sure still applies:

   /* TODO: The function should depend on current function ABI but
  builtins.c would need updating then. Therefore we use the
  default ABI.  */

The patch fixes ix86_function_arg_regno_p and ix86_function_value_regno_p to
follow the ABI attribute. So, if there is ABI attribute specified, it won't
just change mid-compilation. If cfun is non-NULL, we can look into
cfun->machine->call_abi, to determine current ABI.

With the proposed patch, we get:

;;  entry block defs 0 [ax] 1 [dx] 2 [cx] 4 [si] 5 [di] 6 [bp] 7 [sp] 16
[argp] 20 [frame] 21 [xmm0] 22 [xmm1] 23 [xmm2] 24 [xmm3] 25 [xmm4] 26 [xmm5]
27 [xmm6] 28 [xmm7] 37 [r8] 38 [r9]

And AFAICS the assembly looks correct.

[Bug objc/66367] New: Objective-C Variadic Method Not Working

2015-06-01 Thread chrisloonam at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66367

Bug ID: 66367
   Summary: Objective-C Variadic Method Not Working
   Product: gcc
   Version: 5.1.0
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: objc
  Assignee: unassigned at gcc dot gnu.org
  Reporter: chrisloonam at gmail dot com
  Target Milestone: ---

Created attachment 35671
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=35671&action=edit
The source file that is generating the error, pre-compiled with gcc -save-temps

This error is being experienced on GCC 5.1.0 on an Arch Linux system. 

When making a variadic method like the following

- (void)method:(id)o, ...
{
int c = 1;
va_list list;
va_start(list, o);
while (va_arg(list, id))
c++;
va_end(list);
}
the compiler reports the following error

error: expected expression before ‘id’
If `id` is replaced with `void *`, the same error occurs.

Attached is the pre-compiled source of the file where you can find this code.
The file succssfully compiles in clang, leading me to believe that this is in
fact a bug and not a programmer error.

[Bug target/66275] __attribute__((sysv_abi)) with x86_64-w64-mingw32-gcc generates incorrect code

2015-06-01 Thread ubizjak at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66275

--- Comment #4 from Uroš Bizjak  ---
Created attachment 35670
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=35670&action=edit
Proposed patch

Patch that fixes ix86_function_arg_regno_p and ix86_function_value_regno_p to
follow the ABI attribute.

[Bug target/66275] __attribute__((sysv_abi)) with x86_64-w64-mingw32-gcc generates incorrect code

2015-06-01 Thread ubizjak at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66275

Uroš Bizjak  changed:

   What|Removed |Added

 Target||x86_64-w64-mingw32-gcc
 CC||ktietz at gcc dot gnu.org,
   ||ubizjak at gmail dot com
  Component|rtl-optimization|target

--- Comment #3 from Uroš Bizjak  ---
At the end of the day, this is target problem.

From _.dfinit dump:

;;  entry block defs 1 [dx] 2 [cx] 6 [bp] 7 [sp] 16 [argp] 20 [frame] 21
[xmm0] 22 [xmm1] 23 [xmm2] 24 [xmm3] 25 [xmm4] 26 [xmm5] 27 [xmm6] 28 [xmm7] 37
[r8] 38 [r9]

Registers DI and SI should also be listed here.

I have a patch.

[Bug libstdc++/66354] [UBSAN] stl_algobase.h:708:7: runtime error: null pointer passed as argument

2015-06-01 Thread dimhen at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66354

Dmitry G. Dyachenko  changed:

   What|Removed |Added

 Status|ASSIGNED|RESOLVED
 Resolution|--- |FIXED

--- Comment #5 from Dmitry G. Dyachenko  ---
r223920 PASS for me


[Bug libstdc++/66354] [UBSAN] stl_algobase.h:708:7: runtime error: null pointer passed as argument

2015-06-01 Thread dimhen at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66354

--- Comment #4 from Dmitry G. Dyachenko  ---
(In reply to Jonathan Wakely from comment #1)
> (In reply to Dmitry G. Dyachenko from comment #0)
> > Sorry, I have no compact testcase.
> 
> Could you at least use -fno-sanitize-recover=undefined and look at the stack
> trace where it happens?

Alas, there are no stack with -fno-sanitize-recover=undefined


[Bug fortran/66366] New: ICE on invalid with non-allocatable CLASS variable [OOP]

2015-06-01 Thread abensonca at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66366

Bug ID: 66366
   Summary: ICE on invalid with non-allocatable CLASS variable
[OOP]
   Product: gcc
   Version: 6.0
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: fortran
  Assignee: unassigned at gcc dot gnu.org
  Reporter: abensonca at gmail dot com
  Target Milestone: ---

The following invalid code causes an ICE with gfortran 6.0.0 223992:

module bug

  type :: t1d
   contains
 procedure :: interpolate => interp
  end type t1d

  type :: tff
 class(t1d) :: transfer
  end type tff

contains

  double precision function interp(self)
implicit none
class(t1d), intent(inout) :: self
return
  end function interp

  double precision function fvb(self)
implicit none
class(tff), intent(inout) :: self
fvb=self%transfer%interpolate()
return
  end function fvb

end module bug

$ gfortran -v  
  Using built-in specs.
COLLECT_GCC=/opt/gcc-trunk/bin/gfortran
COLLECT_LTO_WRAPPER=/opt/gcc-trunk/libexec/gcc/x86_64-unknown-linux-gnu/6.0.0/lto-wrapper
Target: x86_64-unknown-linux-gnu
Configured with: ../gcc-trunk/configure --prefix=/opt/gcc-trunk
--enable-languages=c,c++,fortran --disable-multilib
Thread model: posix
gcc version 6.0.0 20150517 (experimental) (GCC) 


 gfortran -c bug.F90 -o bug.o
bug.F90:9:27:

  class(t1d) :: transfer
1
Error: Component ‘transfer’ with CLASS at (1) must be allocatable or pointer
f951: internal compiler error: in check_typebound_baseobject, at
fortran/resolve.c:5521
0x637465 check_typebound_baseobject
../../gcc-trunk/gcc/fortran/resolve.c:5521
0x63791e resolve_compcall
../../gcc-trunk/gcc/fortran/resolve.c:5812
0x63404e resolve_typebound_function
../../gcc-trunk/gcc/fortran/resolve.c:5954
0x63404e gfc_resolve_expr(gfc_expr*)
../../gcc-trunk/gcc/fortran/resolve.c:6265
0x63a8b6 gfc_resolve_code(gfc_code*, gfc_namespace*)
../../gcc-trunk/gcc/fortran/resolve.c:10095
0x63d2d2 resolve_codes
../../gcc-trunk/gcc/fortran/resolve.c:15055
0x63d1d7 resolve_codes
../../gcc-trunk/gcc/fortran/resolve.c:15040
0x63d3b2 gfc_resolve(gfc_namespace*)
../../gcc-trunk/gcc/fortran/resolve.c:15083
0x628cb6 gfc_parse_file()
../../gcc-trunk/gcc/fortran/parse.c:5477
0x669445 gfc_be_parse_file
../../gcc-trunk/gcc/fortran/f95-lang.c:228
Please submit a full bug report,
with preprocessed source if appropriate.
Please include the complete backtrace with any bug report.
See  for instructions.


The code is invalid as the CLASS variable in "tff" is neither allocatable nor a
pointer. The call to the "interpolate" function of the "t1d" class seems to be
necessary to trigger the ICE.

[Bug target/66358] [5/6 Regression] [SH] ICE: in extract_constrain_insn, at recog.c:2232

2015-06-01 Thread olegendo at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66358

--- Comment #4 from Oleg Endo  ---
(In reply to Kazumoto Kojima from comment #1)
> Created attachment 35661 [details]
> reduced test case
> 
> FYI, it doesn't fail with -O2 -fpic -mlra.

Somehow the reduced test case seems to work OK on sh-elf even without -mlra.

sh-elf-gcc -v
Using built-in specs.
COLLECT_GCC=sh-elf-gcc
COLLECT_LTO_WRAPPER=/usr/local/libexec/gcc/sh-elf/6.0.0/lto-wrapper
Target: sh-elf
Configured with: ../gcc-trunk/configure --target=sh-elf --prefix=/usr/local
--enable-languages=c,c++ --enable-multilib --enable-libssp --disable-nls
--disable-werror --enable-lto --with-newlib --with-system-zlib
Thread model: single
gcc version 6.0.0 20150521 (experimental) (GCC) 

Maybe I'm missing some option?


[Bug libstdc++/66030] [5.1.0] std::codecvt_byname missing from libstdc++ DLL

2015-06-01 Thread jroivas at iki dot fi
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66030

--- Comment #7 from Jouni Roivas  ---
(In reply to Jouni Roivas from comment #6)
> (In reply to Jonathan Wakely from comment #5)
> > Does this work?
> 
> Yes, it works.


Now I found some more missing symbols:

undefined reference to `std::codecvt::id'
undefined reference to `std::codecvt::id'


[Bug libstdc++/66030] [5.1.0] std::codecvt_byname missing from libstdc++ DLL

2015-06-01 Thread jroivas at iki dot fi
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66030

--- Comment #6 from Jouni Roivas  ---
(In reply to Jonathan Wakely from comment #5)
> Does this work?

Yes, it works.


[Bug c++/66365] Regression - GCC 5.1.0: Can't convert std::basic_istream to bool

2015-06-01 Thread redi at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66365

Jonathan Wakely  changed:

   What|Removed |Added

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

--- Comment #1 from Jonathan Wakely  ---
Upstream need to fix their code, there is no implicit conversion from
basic_istream to bool in C++11, so gcc-5 is correct to reject the code.

return static_cast(is.read(static_cast(p), len));


[Bug c++/66365] New: Regression - GCC 5.1.0: Can't convert std::basic_istream to bool

2015-06-01 Thread alex.schnaidt at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66365

Bug ID: 66365
   Summary: Regression - GCC 5.1.0: Can't convert
std::basic_istream to bool
   Product: gcc
   Version: 5.1.0
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: c++
  Assignee: unassigned at gcc dot gnu.org
  Reporter: alex.schnaidt at gmail dot com
  Target Milestone: ---

Created attachment 35669
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=35669&action=edit
preprocessed rand.cpp

After the update from gcc 4.9.2 to 5.1.0 the build of 'passwordsafe'[1] failed
with the following error:

g++ -std=c++11 -Wall -I../../core -I../.. `/usr/bin/wx-config --debug=no
--unicode=yes --inplace --cxxflags` -pthread -I/usr/include/ykpers-1   -O0 -g
-ggdb -DUNICODE -DDEBUG -c rand.cpp -o ../../../obj/unicodedebug/os/rand.o
rand.cpp: In function ‘bool pws_os::GetRandomData(void*, long unsigned int)’:
rand.cpp:38:45: error: cannot convert ‘std::basic_istream::__istream_type
{aka std::basic_istream}’ to ‘bool’ in return
   return is.read(static_cast(p), len);
 ^

This used to work with 4.9.2 and upstream[2] thinks this to be a compiler
issue. Unfortunately my c++ knowledge isn't good enough to come up with a short
example to reproduce it, the original code is at [3].

% gcc -v
Using built-in specs.
COLLECT_GCC=gcc
COLLECT_LTO_WRAPPER=/usr/lib/gcc/x86_64-unknown-linux-gnu/5.1.0/lto-wrapper
Target: x86_64-unknown-linux-gnu
Configured with: /build/gcc-multilib/src/gcc-5-20150519/configure --prefix=/usr
--libdir=/usr/lib --libexecdir=/usr/lib --mandir=/usr/share/man
--infodir=/usr/share/info --with-bugurl=https://bugs.archlinux.org/
--enable-languages=c,c++,ada,fortran,go,lto,objc,obj-c++ --enable-shared
--enable-threads=posix --enable-libmpx --with-system-zlib --with-isl
--enable-__cxa_atexit --disable-libunwind-exceptions --enable-clocale=gnu
--disable-libstdcxx-pch --disable-libssp --enable-gnu-unique-object
--enable-linker-build-id --enable-lto --enable-plugin
--enable-install-libiberty --with-linker-hash-style=gnu
--enable-gnu-indirect-function --enable-multilib --disable-werror
--enable-checking=release --with-default-libstdcxx-abi=c++98
Thread model: posix
gcc version 5.1.0 (GCC)

[1] http://sourceforge.net/projects/passwordsafe/
[2] https://sourceforge.net/p/passwordsafe/bugs/1251/
[3]
http://sourceforge.net/p/passwordsafe/git-code/ci/0.95.1BETA/tree/src/os/linux/rand.cpp

[Bug libstdc++/66030] [5.1.0] std::codecvt_byname missing from libstdc++ DLL

2015-06-01 Thread redi at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66030

--- Comment #5 from Jonathan Wakely  ---
Does this work?

--- a/libstdc++-v3/config/abi/pre/gnu.ver
+++ b/libstdc++-v3/config/abi/pre/gnu.ver
@@ -542,6 +542,9 @@ GLIBCXX_3.4 {
 # std::codecvt_byname
 _ZNSt14codecvt_bynameI[cw]c11__mbstate_tEC[12]EPKc[jmy];
 _ZNSt14codecvt_bynameI[cw]c11__mbstate_tED*;
+#if defined (_WIN32) && !defined (__CYGWIN__)
+_ZNSt14codecvt_bynameI[cw]ciE[CD]*;
+#endif

 # std::collate
 _ZNSt7collateI[cw]*;

This won't affect any targets which use versioned symbols.


[Bug libstdc++/66030] [5.1.0] std::codecvt_byname missing from libstdc++ DLL

2015-06-01 Thread redi at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66030

--- Comment #4 from Jonathan Wakely  ---
(In reply to Jouni Roivas from comment #3)
> Created attachment 35668 [details]
> proposed patch
> 
> This patch solves this problem for me. However I'm not sure if it covers all
> the cases.

This is wrong because it adds the symbols to a frozen symbol version, we need a
new symbol version.

What I don't understand is why the symbols are only missing now, when they've
never been correctly exported, even prior to GCC 5.


[Bug libstdc++/66030] [5.1.0] std::codecvt_byname missing from libstdc++ DLL

2015-06-01 Thread jroivas at iki dot fi
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66030

Jouni Roivas  changed:

   What|Removed |Added

 CC||jroivas at iki dot fi

--- Comment #3 from Jouni Roivas  ---
Created attachment 35668
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=35668&action=edit
proposed patch

This patch solves this problem for me. However I'm not sure if it covers all
the cases.


[Bug c++/66364] New: poor optimization of packed structs containing bitfields

2015-06-01 Thread rogero at howzatt dot demon.co.uk
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66364

Bug ID: 66364
   Summary: poor optimization of packed structs containing
bitfields
   Product: gcc
   Version: 5.1.0
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: c++
  Assignee: unassigned at gcc dot gnu.org
  Reporter: rogero at howzatt dot demon.co.uk
  Target Milestone: ---
Target: x86_64-redhat-linux

Created attachment 35667
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=35667&action=edit
Simple program demonstrating the issue

Code accessing bitfields in packed structures seem to load the value a byte at
a time and build the value up using shifts and ors even with -O3.

On x64 it could load the value using a single mov instruction as it does when
the struct is not packed or when the field is not a bitfield.


[Bug libstdc++/66359] Regex Fails to match

2015-06-01 Thread ge...@schorsch-tech.de
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66359

--- Comment #3 from ge...@schorsch-tech.de ---
I tried to apply that revision to gcc-4.9.2. Now i get the following error.

g++ -DUSE_STD -std=c++11 main.cpp 
In file included from
/usr/lib/gcc/x86_64-pc-linux-gnu/4.9.2/include/g++-v4/regex:58:0,
 from main.cpp:2:
/usr/lib/gcc/x86_64-pc-linux-gnu/4.9.2/include/g++-v4/bits/regex.h:65:5:
warning: inline function 'std::shared_ptr >
std::__detail::__compile_nfa(const typename _TraitsT::char_type*, const
typename _TraitsT::char_type*, const _TraitsT&,
std::regex_constants::syntax_option_type) [with _TraitsT =
std::regex_traits; typename _TraitsT::char_type = char]' used but never
defined
 __compile_nfa(const typename _TraitsT::char_type* __first,
 ^
/tmp/ccMywN21.o: In function `std::basic_regex
>::basic_regex(char const*, char const*,
std::regex_constants::syntax_option_type)':
main.cpp:(.text._ZNSt11basic_regexIcSt12regex_traitsIcEEC2IPKcEET_S6_NSt15regex_constants18syntax_option_typeE[_ZNSt11basic_regexIcSt12regex_traitsIcEEC5IPKcEET_S6_NSt15regex_constants18syntax_option_typeE]+0xd5):
undefined reference to
`std::shared_ptr > >
std::__detail::__compile_nfa
>(std::regex_traits::char_type const*, std::regex_traits::char_type
const*, std::regex_traits const&,
std::regex_constants::syntax_option_type)'
collect2: error: ld returned 1 exit status


I added my applied patch too. I copied the files from your revision to my tree
and used git to create that patch.


[Bug target/65697] __atomic memory barriers not strong enough for __sync builtins

2015-06-01 Thread mwahab at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=65697

--- Comment #60 from mwahab at gcc dot gnu.org ---
Author: mwahab
Date: Mon Jun  1 15:24:37 2015
New Revision: 223986

URL: https://gcc.gnu.org/viewcvs?rev=223986&root=gcc&view=rev
Log:
PR target/65697
* gcc.target/aarch64/sync-comp-swap.c: New.
* gcc.target/aarch64/sync-comp-swap.x: New.
* gcc.target/aarch64/sync-op-acquire.c: New.
* gcc.target/aarch64/sync-op-acquire.x: New.
* gcc.target/aarch64/sync-op-full.c: New.
* gcc.target/aarch64/sync-op-full.x: New.
* gcc.target/aarch64/sync-op-release.c: New.
* gcc.target/aarch64/sync-op-release.x: New.


Added:
trunk/gcc/testsuite/gcc.target/aarch64/sync-comp-swap.c
trunk/gcc/testsuite/gcc.target/aarch64/sync-comp-swap.x
trunk/gcc/testsuite/gcc.target/aarch64/sync-op-acquire.c
trunk/gcc/testsuite/gcc.target/aarch64/sync-op-acquire.x
trunk/gcc/testsuite/gcc.target/aarch64/sync-op-full.c
trunk/gcc/testsuite/gcc.target/aarch64/sync-op-full.x
trunk/gcc/testsuite/gcc.target/aarch64/sync-op-release.c
trunk/gcc/testsuite/gcc.target/aarch64/sync-op-release.x
Modified:
trunk/gcc/testsuite/ChangeLog


[Bug libstdc++/66359] Regex Fails to match

2015-06-01 Thread ge...@schorsch-tech.de
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66359

--- Comment #4 from ge...@schorsch-tech.de ---
Created attachment 35666
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=35666&action=edit
tried backport of 217461


[Bug c++/59256] qualified name in friend function declaration doesn't match previous declaration in inline namespace

2015-06-01 Thread ge...@schorsch-tech.de
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=59256

--- Comment #6 from ge...@schorsch-tech.de ---
ups ... wrong bug .. please delete that submitted patch


[Bug target/65697] __atomic memory barriers not strong enough for __sync builtins

2015-06-01 Thread mwahab at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=65697

--- Comment #59 from mwahab at gcc dot gnu.org ---
Author: mwahab
Date: Mon Jun  1 15:21:02 2015
New Revision: 223984

URL: https://gcc.gnu.org/viewcvs?rev=223984&root=gcc&view=rev
Log:
PR target/65697
* config/aarch64/aarch64.c (aarch64_split_compare_and_swap): Check
for __sync memory models, emit initial loads and final barriers as
appropriate.


Modified:
trunk/gcc/ChangeLog
trunk/gcc/config/aarch64/aarch64.c


[Bug c++/59256] qualified name in friend function declaration doesn't match previous declaration in inline namespace

2015-06-01 Thread ge...@schorsch-tech.de
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=59256

ge...@schorsch-tech.de changed:

   What|Removed |Added

 CC||ge...@schorsch-tech.de

--- Comment #5 from ge...@schorsch-tech.de ---
Created attachment 35665
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=35665&action=edit
tried backport of 217461 to 4.9.2


[Bug target/65697] __atomic memory barriers not strong enough for __sync builtins

2015-06-01 Thread mwahab at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=65697

--- Comment #58 from mwahab at gcc dot gnu.org ---
Author: mwahab
Date: Mon Jun  1 15:18:19 2015
New Revision: 223983

URL: https://gcc.gnu.org/viewcvs?rev=223983&root=gcc&view=rev
Log:
PR target/65697
* config/aarch64/aarch64.c (aarch64_emit_post_barrier):New.
(aarch64_split_atomic_op): Check for __sync memory models, emit
appropriate initial loads and final barriers.


Modified:
trunk/gcc/ChangeLog
trunk/gcc/config/aarch64/aarch64.c


[Bug target/66363] New: ICE in modified test inline-36.c

2015-06-01 Thread vogt at linux dot vnet.ibm.com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66363

Bug ID: 66363
   Summary: ICE in modified test inline-36.c
   Product: gcc
   Version: 6.0
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: target
  Assignee: unassigned at gcc dot gnu.org
  Reporter: vogt at linux dot vnet.ibm.com
  Target Milestone: ---

This small test program derived from gcc.dg/inline-39.c (by adding the inline
keyword) exposes an ICE on s390x, but this may be/probably is a problem on all
platforms:

-- snip --
int g;
inline __attribute__((always_inline)) void bar (void)
{
  g++;
}

void foo2 (void)
{
  bar();
}
-- snip --

Compiling with "-O2 -fdisable-tree-einline=foo2 -fdisable-ipa-inline" results
in an ICE:

-- snip --
cc1: note: disable pass tree-einline for function foo2  
cc1: note: disable pass ipa-inline for functions in the range of [0,
4294967295]
bar/1 (bar) @0x3fff0631300
  Type: function definition analyzed
  Visibility: external public
  References: g/0 (read)g/0 (write)
  Referring: 
  Availability: available
  First run: 0
  Function flags: body nonfreeing_fn
  Called by: 
  Calls: 
ice1.c:12:1: internal compiler error: nodes with unreleased memory found
 }
 ^
0x804d6c41 symbol_table::compile()
../../gcc/cgraphunit.c:2413
0x804d6d01 symbol_table::finalize_compilation_unit()
../../gcc/cgraphunit.c:2460
0x8029226b c_write_global_declarations()
../../gcc/c/c-decl.c:10824
-- snip --


[Bug c++/66362] New: Compiling and linking with option -static-libgcc breaks pthread library stack (funcs and macroses)

2015-06-01 Thread vvs at a dot legko.ru
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66362

Bug ID: 66362
   Summary: Compiling and linking with option -static-libgcc
breaks pthread library stack (funcs and macroses)
   Product: gcc
   Version: 4.8.2
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: c++
  Assignee: unassigned at gcc dot gnu.org
  Reporter: vvs at a dot legko.ru
  Target Milestone: ---

Created attachment 35664
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=35664&action=edit
Use of pthread_cleanup_push() and -static-libgcc option breaks the prog

When compiling with g++, when the pthread_cleanup_push() is used to push the
handler,  the handler, when called, makes the prog to Abort.
Sample prog is in attachment.
Compiling options are:
g++ test_pc.cpp -lpthread -static-libgcc -static-libstdc++  -o test_pc
System - Linux.


[Bug middle-end/66334] cleanup block fails to initialize EBX

2015-06-01 Thread hjl.tools at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66334

--- Comment #6 from H.J. Lu  ---
Should we do something special if a basic block calls BUILT_IN_UNWIND_RESUME?


[Bug c++/66360] thread_local variable needs copy constructor

2015-06-01 Thread redi at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66360

Jonathan Wakely  changed:

   What|Removed |Added

 Status|UNCONFIRMED |NEW
   Last reconfirmed||2015-06-01
 Ever confirmed|0   |1

--- Comment #2 from Jonathan Wakely  ---
struct non_copyable
{
  non_copyable(const non_copyable &) = delete;
  non_copyable();
};

struct wrapper
{
  non_copyable value;

  template 
  wrapper(Args &&... args)
: value(args...)
  {
  }
};

struct V
{
  template 
  V(Args &&... args)
  {
wrapper v(args...);
  }
};

V v;


[Bug middle-end/66352] [6 Regression] ICE in in dfs_enumerate_from, at cfganal.c:1195

2015-06-01 Thread rguenth at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66352
Bug 66352 depends on bug 66340, which changed state.

Bug 66340 Summary: [6 Regression] profiledbootstrap failure on x86-64 with LTO
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66340

   What|Removed |Added

 Status|ASSIGNED|RESOLVED
 Resolution|--- |FIXED


[Bug target/66358] [5/6 Regression] [SH] ICE: in extract_constrain_insn, at recog.c:2232

2015-06-01 Thread rguenth at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66358

Richard Biener  changed:

   What|Removed |Added

   Target Milestone|--- |5.2


[Bug tree-optimization/66349] ICE on valid code at -O1, -O2 and -O3 on x86_64-linux-gnu in dfs_enumerate_from, at cfganal.c:1195

2015-06-01 Thread rguenth at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66349
Bug 66349 depends on bug 66340, which changed state.

Bug 66340 Summary: [6 Regression] profiledbootstrap failure on x86-64 with LTO
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66340

   What|Removed |Added

 Status|ASSIGNED|RESOLVED
 Resolution|--- |FIXED


[Bug bootstrap/66340] [6 Regression] profiledbootstrap failure on x86-64 with LTO

2015-06-01 Thread rguenth at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66340

Richard Biener  changed:

   What|Removed |Added

 Status|ASSIGNED|RESOLVED
 Resolution|--- |FIXED

--- Comment #2 from Richard Biener  ---
Patch reverted.


[Bug middle-end/66314] [6 Regression] ice in verify_loop_structure

2015-06-01 Thread rguenth at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66314

Richard Biener  changed:

   What|Removed |Added

 Status|REOPENED|ASSIGNED

--- Comment #10 from Richard Biener  ---
Adding gcc/testsuite/gcc.dg/torture/pr66349.c
Adding gcc/testsuite/gcc.dg/torture/pr66357.c
Adding gcc/testsuite/gfortran.fortran-torture/compile/pr66352.f90

were added for the regressions caused by the original fix.


[Bug tree-optimization/66357] [6 Regression] ICE on valid code at -O1, -O2 and -O3 on x86_64-linux-gnu in verify_loop_structure, at cfgloop.c:1662

2015-06-01 Thread rguenth at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66357

Richard Biener  changed:

   What|Removed |Added

 Status|ASSIGNED|RESOLVED
 Resolution|--- |FIXED

--- Comment #4 from Richard Biener  ---
Patch reverted.


[Bug middle-end/66352] [6 Regression] ICE in in dfs_enumerate_from, at cfganal.c:1195

2015-06-01 Thread rguenth at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66352

--- Comment #5 from Richard Biener  ---
Author: rguenth
Date: Mon Jun  1 13:58:50 2015
New Revision: 223980

URL: https://gcc.gnu.org/viewcvs?rev=223980&root=gcc&view=rev
Log:
2015-06-01  Richard Biener  

PR tree-optimization/66349
PR tree-optimization/66352
PR tree-optimization/66357
* gcc.dg/torture/pr66357.c: New testcase.
* gcc.dg/torture/pr66349.c: Likewise.
* gfortran.fortran-torture/compile/pr66352.f90: Likewise.

Added:
trunk/gcc/testsuite/gcc.dg/torture/pr66349.c
trunk/gcc/testsuite/gcc.dg/torture/pr66357.c
trunk/gcc/testsuite/gfortran.fortran-torture/compile/pr66352.f90
Modified:
trunk/gcc/testsuite/ChangeLog


[Bug tree-optimization/66357] [6 Regression] ICE on valid code at -O1, -O2 and -O3 on x86_64-linux-gnu in verify_loop_structure, at cfgloop.c:1662

2015-06-01 Thread rguenth at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66357

--- Comment #3 from Richard Biener  ---
Author: rguenth
Date: Mon Jun  1 13:58:50 2015
New Revision: 223980

URL: https://gcc.gnu.org/viewcvs?rev=223980&root=gcc&view=rev
Log:
2015-06-01  Richard Biener  

PR tree-optimization/66349
PR tree-optimization/66352
PR tree-optimization/66357
* gcc.dg/torture/pr66357.c: New testcase.
* gcc.dg/torture/pr66349.c: Likewise.
* gfortran.fortran-torture/compile/pr66352.f90: Likewise.

Added:
trunk/gcc/testsuite/gcc.dg/torture/pr66349.c
trunk/gcc/testsuite/gcc.dg/torture/pr66357.c
trunk/gcc/testsuite/gfortran.fortran-torture/compile/pr66352.f90
Modified:
trunk/gcc/testsuite/ChangeLog


[Bug tree-optimization/66349] ICE on valid code at -O1, -O2 and -O3 on x86_64-linux-gnu in dfs_enumerate_from, at cfganal.c:1195

2015-06-01 Thread rguenth at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66349

--- Comment #4 from Richard Biener  ---
Author: rguenth
Date: Mon Jun  1 13:58:50 2015
New Revision: 223980

URL: https://gcc.gnu.org/viewcvs?rev=223980&root=gcc&view=rev
Log:
2015-06-01  Richard Biener  

PR tree-optimization/66349
PR tree-optimization/66352
PR tree-optimization/66357
* gcc.dg/torture/pr66357.c: New testcase.
* gcc.dg/torture/pr66349.c: Likewise.
* gfortran.fortran-torture/compile/pr66352.f90: Likewise.

Added:
trunk/gcc/testsuite/gcc.dg/torture/pr66349.c
trunk/gcc/testsuite/gcc.dg/torture/pr66357.c
trunk/gcc/testsuite/gfortran.fortran-torture/compile/pr66352.f90
Modified:
trunk/gcc/testsuite/ChangeLog


[Bug middle-end/66352] [6 Regression] ICE in in dfs_enumerate_from, at cfganal.c:1195

2015-06-01 Thread rguenth at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66352

Richard Biener  changed:

   What|Removed |Added

 Status|ASSIGNED|RESOLVED
 Resolution|--- |FIXED

--- Comment #4 from Richard Biener  ---
Patch reverted.


[Bug tree-optimization/66349] ICE on valid code at -O1, -O2 and -O3 on x86_64-linux-gnu in dfs_enumerate_from, at cfganal.c:1195

2015-06-01 Thread rguenth at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66349

Richard Biener  changed:

   What|Removed |Added

 Status|ASSIGNED|RESOLVED
 Resolution|--- |FIXED

--- Comment #3 from Richard Biener  ---
Patch reverted.


[Bug middle-end/66314] [6 Regression] ice in verify_loop_structure

2015-06-01 Thread rguenth at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66314

Richard Biener  changed:

   What|Removed |Added

 Status|RESOLVED|REOPENED
 Resolution|FIXED   |---

--- Comment #9 from Richard Biener  ---
Reopen.


[Bug middle-end/66314] [6 Regression] ice in verify_loop_structure

2015-06-01 Thread rguenth at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66314

--- Comment #8 from Richard Biener  ---
Author: rguenth
Date: Mon Jun  1 13:55:12 2015
New Revision: 223979

URL: https://gcc.gnu.org/viewcvs?rev=223979&root=gcc&view=rev
Log:
2015-06-01  Richard Biener  

Revert
2015-05-29  Richard Biener  

PR tree-optimization/66314
* tree-ssa-threadupdate.c (create_block_for_threading): Add
parameter that says which loop the new block belongs to.
(ssa_create_duplicates): Blocks duplicated for the threaded
path belong to the loop of the thread destination.

* gcc.dg/asan/pr66314.c: New testcase.

Removed:
trunk/gcc/testsuite/gcc.dg/asan/pr66314.c
Modified:
trunk/gcc/ChangeLog
trunk/gcc/testsuite/ChangeLog
trunk/gcc/tree-ssa-threadupdate.c


[Bug c++/66361] Could not able to compile with /opt/ELDK42/usr/bin/ppc-linux-g++

2015-06-01 Thread pinskia at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66361

--- Comment #3 from Andrew Pinski  ---
Also you should get support from where you got this binary toolchain from since
that is what is really causing an issue.

That is report this to http://www.denx.de/wiki/DULG/ELDK.


[Bug c++/66360] thread_local variable needs copy constructor

2015-06-01 Thread pinskia at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66360

--- Comment #1 from Andrew Pinski  ---
This has nothing to do with thread_local.  That is removing static thread_local
still causes it to produce an error.


Here is a more reduced testcase:
template 
struct wrapper final
{
  T value;
  template 
  wrapper(Args &&...args)
: value(args...)
  {
  }
};

struct non_copyable
{
  non_copyable(const non_copyable &) = delete;
  non_copyable();
  ~non_copyable();
};

template 
class thread_local_variable final
{
private:
  wrapper *pointer;
public:
  template 
  thread_local_variable(Args &&...args)
  {
wrapper v(args...);
pointer = &v;
  }
  T &get()
  {
return pointer->value;
  }
};

non_copyable &fn()
{
  thread_local_variable v;
  return v.get();
}


--- CUT 
args here is {}.  I suspect an empty arguments it not being treated correctly.


[Bug target/66358] [5/6 Regression] [SH] ICE: in extract_constrain_insn, at recog.c:2232

2015-06-01 Thread kkojima at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66358

--- Comment #3 from Kazumoto Kojima  ---
(In reply to Oleg Endo from comment #2)

Defaulting -mlra might be reasonable for gcc 6.
For gcc 5, I thought the patch for prepare_move_operands like

diff --git a/config/sh/sh.c b/config/sh/sh.c
index 1cf6ed0..b855d70 100644
--- a/config/sh/sh.c
+++ b/config/sh/sh.c
@@ -1789,9 +1789,8 @@ prepare_move_operands (rtx operands[], machine_mode mode)
 target/55212.
 We split possible load/store to two move insns via r0 so as to
 shorten R0 live range.  It will make some codes worse but will
-win on avarage for LRA.  */
-  else if (sh_lra_p ()
-  && TARGET_SH1 && ! TARGET_SH2A
+win on avarage.  */
+  else if (TARGET_SH1 && ! TARGET_SH2A
   && (mode == QImode || mode == HImode)
   && ((REG_P (operands[0]) && MEM_P (operands[1]))
   || (REG_P (operands[1]) && MEM_P (operands[0]

which would be a simplest form of the preallocating r0 for this limited case,
though I'm afraid that it's still too invasive for the release branch.


[Bug c++/66361] Could not able to compile with /opt/ELDK42/usr/bin/ppc-linux-g++

2015-06-01 Thread redi at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66361

Jonathan Wakely  changed:

   What|Removed |Added

 Status|UNCONFIRMED |RESOLVED
 Resolution|--- |WORKSFORME

--- Comment #2 from Jonathan Wakely  ---
.


[Bug c++/66361] Could not able to compile with /opt/ELDK42/usr/bin/ppc-linux-g++

2015-06-01 Thread redi at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66361

--- Comment #1 from Jonathan Wakely  ---
GCC is no longer supported or maintained, please use a current release or
report the bug to whoever you got the old GCC from.


[Bug c++/66361] New: Could not able to compile with /opt/ELDK42/usr/bin/ppc-linux-g++

2015-06-01 Thread bolenedisatyanarayana at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66361

Bug ID: 66361
   Summary: Could not able to compile with
/opt/ELDK42/usr/bin/ppc-linux-g++
   Product: gcc
   Version: 4.2.2
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: c++
  Assignee: unassigned at gcc dot gnu.org
  Reporter: bolenedisatyanarayana at gmail dot com
  Target Milestone: ---

I was tring to compile a simple test.cpp.

here is my test.cpp

#include
using namespace std;
int main()
{
 cout<<"hello world";
 return 0;
}

Compilation Errors:

test.cpp:1:19: error: iostream: No such file or directory
test.cpp: In function 'int main()':
test.cpp:10: error: 'cout' was not declared in this scope

Why it Could not able to fetch iostream from any include directories? So,I
tried compiling by explicitly including

/opt/ELDK42/usr/bin/ppc_85xx-g++ test.cpp
-I/opt/ELDK42/ppc_85xx/usr/include/c++/4.2.2/

Then, it gave the following errors:

In file included from test.cpp:1:
/opt/ELDK42/ppc_85xx/usr/include/c++/4.2.2/iostream:44:28: error:
bits/c++config.h: No such file or directory
In file included from /opt/ELDK42/ppc_85xx/usr/include/c++/4.2.2/ios:43,
 from /opt/ELDK42/ppc_85xx/usr/include/c++/4.2.2/ostream:45,
 from /opt/ELDK42/ppc_85xx/usr/include/c++/4.2./iostream:45,

But, i could see that missing header file here:

/opt/ELDK42/ppc_85xx/usr/include/c++/4.2.2/powerpc-linux/bits/c++config.h

I am not able to figure out, why gcc is not able to find the header files
properly & compile??

Any help, highly appreciated.

System Details: Ubuntu 14.04 gcc 4.2.2


[Bug libstdc++/66262] [REGRESSION] testsuite failure with libstdc++ (gcc-5) and g++-4.9 together

2015-06-01 Thread costamagnagianfranco at yahoo dot it
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66262

--- Comment #15 from Gianfranco  ---
Thanks to all for the suggestions! Apparently this is what I presumed from the
begin (I read a lot about ABI changes in gcc-5)

I'll try to figure out with doko what is the best approach for fixing this!
thanks to all again,

G.


[Bug target/66358] [5/6 Regression] [SH] ICE: in extract_constrain_insn, at recog.c:2232

2015-06-01 Thread olegendo at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66358

--- Comment #2 from Oleg Endo  ---
There was this idea of doing some sort of pre-reg-alloc or special case
handling for R0 in an SH specific RTL pass before regular RA -- see PR 64785.

One option could be to have a simple version of that pass for GCC 5 to fix this
PR (and maybe several other of this kind).  For GCC 6 we could probably just
add -mno-lra option and make -mlra the default setting.


[Bug c++/66360] New: thread_local variable needs copy constructor

2015-06-01 Thread programmerjake at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66360

Bug ID: 66360
   Summary: thread_local variable needs copy constructor
   Product: gcc
   Version: 4.8.2
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: c++
  Assignee: unassigned at gcc dot gnu.org
  Reporter: programmerjake at gmail dot com
  Target Milestone: ---

Created attachment 35663
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=35663&action=edit
source code

thread_local variable won't compile when trying to forward empty argument list
to member variable where the member variable has deleted copy/move
constructors.


[Bug libstdc++/66262] [REGRESSION] testsuite failure with libstdc++ (gcc-5) and g++-4.9 together

2015-06-01 Thread redi at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66262

Jonathan Wakely  changed:

   What|Removed |Added

 Status|REOPENED|RESOLVED
 Resolution|--- |INVALID

--- Comment #14 from Jonathan Wakely  ---
However, it's never been supported to combine objects built with different
major versions if using C++11.

(In reply to Gianfranco from comment #0)
> the problem actually is that now Debian has libstdc++ from gcc-5, and the
> default compiler still set to gcc-4.9.

That combination cannot be used for C++11 code.


[Bug libstdc++/66262] [REGRESSION] testsuite failure with libstdc++ (gcc-5) and g++-4.9 together

2015-06-01 Thread redi at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66262

Jonathan Wakely  changed:

   What|Removed |Added

 Status|RESOLVED|REOPENED
 Resolution|DUPLICATE   |---

--- Comment #13 from Jonathan Wakely  ---
Apparently the error is:

/casablanca/Release/tests/functional/streams/fstreambuf_tests.cpp:148: error:
Failure in OpenForReadDoesntCreateFile1:
CHECK_EQUAL(static_cast(std::errc::no_such_file_or_directory),
_condFound.value()) where
static_cast(std::errc::no_such_file_or_directory)=2 and
_condFound.value()=0

Which should not depend on the ABI.


[Bug libstdc++/66262] [REGRESSION] testsuite failure with libstdc++ (gcc-5) and g++-4.9 together

2015-06-01 Thread redi at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66262

--- Comment #12 from Jonathan Wakely  ---
I'm not convinced this is a duplicate, the test tries to catch a
std::system_error not a std::ios::failure.

On Fedora 22 using the old ABI the test passes.


[Bug target/65956] [5/6 Regression] Another ARM overaligned arg passing issue

2015-06-01 Thread jakub at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=65956

Jakub Jelinek  changed:

   What|Removed |Added

   Priority|P3  |P1


[Bug libstdc++/66145] [5/6 Regression] std::ios_base::failure objects thrown from libstdc++.so use old ABI

2015-06-01 Thread hjl.tools at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66145

H.J. Lu  changed:

   What|Removed |Added

 CC||costamagnagianfranco@yahoo.
   ||it

--- Comment #2 from H.J. Lu  ---
*** Bug 66262 has been marked as a duplicate of this bug. ***


[Bug libstdc++/66262] [REGRESSION] testsuite failure with libstdc++ (gcc-5) and g++-4.9 together

2015-06-01 Thread hjl.tools at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66262

H.J. Lu  changed:

   What|Removed |Added

 Resolution|FIXED   |DUPLICATE

--- Comment #11 from H.J. Lu  ---
Dup.

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


[Bug libstdc++/66359] Regex Fails to match

2015-06-01 Thread timshen at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66359

Tim Shen  changed:

   What|Removed |Added

 Status|UNCONFIRMED |ASSIGNED
   Last reconfirmed||2015-06-01
 CC||timshen at gcc dot gnu.org
 Ever confirmed|0   |1

--- Comment #2 from Tim Shen  ---
Thanks for reporting! gcc 5.1 works fine to me:

~ % /usr/bin/g++ --version   
g++ (GCC) 5.1.0
Copyright (C) 2015 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.

~ % /usr/bin/g++ -DUSE_STD -std=c++11 b.cc && ./a.out
Found it


My current guess is this patch fixed the bug:
https://gcc.gnu.org/viewcvs/gcc?view=revision&revision=217461.

I can do a backport when I have time.


[Bug libstdc++/66262] [REGRESSION] testsuite failure with libstdc++ (gcc-5) and g++-4.9 together

2015-06-01 Thread doko at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66262

Matthias Klose  changed:

   What|Removed |Added

 Status|NEW |RESOLVED
 Resolution|--- |FIXED

--- Comment #10 from Matthias Klose  ---
duplicate of PR66145


[Bug target/66215] [4.8/4.9/5/6 Regression] Wrong after label NOP emission for -mhotpatch

2015-06-01 Thread krebbel at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66215

--- Comment #33 from Andreas Krebbel  ---
Author: krebbel
Date: Mon Jun  1 11:29:46 2015
New Revision: 223932

URL: https://gcc.gnu.org/viewcvs?rev=223932&root=gcc&view=rev
Log:
PR 66215: S390: Fix placement of post-label NOPs with -mhotpatch

gcc/ChangeLog:
--
2015-06-01  Dominik Vogt  

Backport from mainline
2015-05-29  Dominik Vogt  

PR target/66215
* config/s390/s390.c (s390_reorg): Fix placement of post-label NOPs
with -mhotpatch=.

gcc/testsuite/ChangeLog:

2015-06-01  Dominik Vogt  

Backport from mainline
2015-05-29  Dominik Vogt  

PR target/66215
* gcc.target/s390/hotpatch-1.c: Remove optimization options from
dg-options.
* gcc.target/s390/hotpatch-10.c: Likewise.
* gcc.target/s390/hotpatch-11.c: Likewise.
* gcc.target/s390/hotpatch-12.c: Likewise.
* gcc.target/s390/hotpatch-17.c: Likewise.
* gcc.target/s390/hotpatch-18.c: Likewise.
* gcc.target/s390/hotpatch-20.c: Likewise.
* gcc.target/s390/hotpatch-21.c: Likewise.
* gcc.target/s390/hotpatch-22.c: Likewise.
* gcc.target/s390/hotpatch-23.c: Likewise.
* gcc.target/s390/hotpatch-24.c: Likewise.
* gcc.target/s390/hotpatch-2.c: Likewise.  Adjust scan-assembler
to check for the exact nops too.
* gcc.target/s390/hotpatch-3.c: Likewise.
* gcc.target/s390/hotpatch-4.c: Likewise.
* gcc.target/s390/hotpatch-5.c: Likewise.
* gcc.target/s390/hotpatch-6.c: Likewise.
* gcc.target/s390/hotpatch-7.c: Likewise.
* gcc.target/s390/hotpatch-8.c: Likewise.
* gcc.target/s390/hotpatch-9.c: Likewise.
* gcc.target/s390/hotpatch-14.c: Likewise.
* gcc.target/s390/hotpatch-15.c: Likewise.
* gcc.target/s390/hotpatch-16.c: Likewise.
* gcc.target/s390/hotpatch-19.c: Likewise.
* gcc.target/s390/hotpatch-25.c: Likewise.  Remove
scan-assembler-times counting number of .align directives.
* gcc.target/s390/hotpatch-13.c: Remove optimization options from
dg-options.  Remove scan-assembler-times counting number of .align
directives.
* gcc.target/s390/hotpatch-26.c: New file.
* gcc.target/s390/hotpatch-27.c: New file.
* gcc.target/s390/hotpatch-28.c: New file.
* gcc.target/s390/s390.exp: Run hotpatch-*.c tests as torture tests
using -Os -O0 -O1 -O2 -O3 options.


Added:
branches/gcc-5-branch/gcc/testsuite/gcc.target/s390/hotpatch-26.c
branches/gcc-5-branch/gcc/testsuite/gcc.target/s390/hotpatch-27.c
branches/gcc-5-branch/gcc/testsuite/gcc.target/s390/hotpatch-28.c
Modified:
branches/gcc-5-branch/gcc/ChangeLog
branches/gcc-5-branch/gcc/config/s390/s390.c
branches/gcc-5-branch/gcc/testsuite/ChangeLog
branches/gcc-5-branch/gcc/testsuite/gcc.target/s390/hotpatch-1.c
branches/gcc-5-branch/gcc/testsuite/gcc.target/s390/hotpatch-10.c
branches/gcc-5-branch/gcc/testsuite/gcc.target/s390/hotpatch-11.c
branches/gcc-5-branch/gcc/testsuite/gcc.target/s390/hotpatch-12.c
branches/gcc-5-branch/gcc/testsuite/gcc.target/s390/hotpatch-13.c
branches/gcc-5-branch/gcc/testsuite/gcc.target/s390/hotpatch-14.c
branches/gcc-5-branch/gcc/testsuite/gcc.target/s390/hotpatch-15.c
branches/gcc-5-branch/gcc/testsuite/gcc.target/s390/hotpatch-16.c
branches/gcc-5-branch/gcc/testsuite/gcc.target/s390/hotpatch-17.c
branches/gcc-5-branch/gcc/testsuite/gcc.target/s390/hotpatch-18.c
branches/gcc-5-branch/gcc/testsuite/gcc.target/s390/hotpatch-19.c
branches/gcc-5-branch/gcc/testsuite/gcc.target/s390/hotpatch-2.c
branches/gcc-5-branch/gcc/testsuite/gcc.target/s390/hotpatch-20.c
branches/gcc-5-branch/gcc/testsuite/gcc.target/s390/hotpatch-21.c
branches/gcc-5-branch/gcc/testsuite/gcc.target/s390/hotpatch-22.c
branches/gcc-5-branch/gcc/testsuite/gcc.target/s390/hotpatch-23.c
branches/gcc-5-branch/gcc/testsuite/gcc.target/s390/hotpatch-24.c
branches/gcc-5-branch/gcc/testsuite/gcc.target/s390/hotpatch-25.c
branches/gcc-5-branch/gcc/testsuite/gcc.target/s390/hotpatch-3.c
branches/gcc-5-branch/gcc/testsuite/gcc.target/s390/hotpatch-4.c
branches/gcc-5-branch/gcc/testsuite/gcc.target/s390/hotpatch-5.c
branches/gcc-5-branch/gcc/testsuite/gcc.target/s390/hotpatch-6.c
branches/gcc-5-branch/gcc/testsuite/gcc.target/s390/hotpatch-7.c
branches/gcc-5-branch/gcc/testsuite/gcc.target/s390/hotpatch-8.c
branches/gcc-5-branch/gcc/testsuite/gcc.target/s390/hotpatch-9.c
branches/gcc-5-branch/gcc/testsuite/gcc.target/s390/s390.exp


[Bug target/66215] [4.8/4.9/5/6 Regression] Wrong after label NOP emission for -mhotpatch

2015-06-01 Thread krebbel at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66215

--- Comment #32 from Andreas Krebbel  ---
Author: krebbel
Date: Mon Jun  1 11:28:09 2015
New Revision: 223931

URL: https://gcc.gnu.org/viewcvs?rev=223931&root=gcc&view=rev
Log:
PR 66215: S390: Fix placement of post-label NOPs with -mhotpatch

gcc/ChangeLog:
--
2015-06-01  Dominik Vogt  

Backport from mainline
2015-05-29  Dominik Vogt  

PR target/66215
* config/s390/s390.c (s390_reorg): Fix placement of post-label NOPs
with -mhotpatch=.

gcc/testsuite/ChangeLog:

2015-06-01  Dominik Vogt  

Backport from mainline
2015-05-29  Dominik Vogt  

PR target/66215
* gcc.target/s390/hotpatch-1.c: Remove optimization options from
dg-options.
* gcc.target/s390/hotpatch-10.c: Likewise.
* gcc.target/s390/hotpatch-11.c: Likewise.
* gcc.target/s390/hotpatch-12.c: Likewise.
* gcc.target/s390/hotpatch-17.c: Likewise.
* gcc.target/s390/hotpatch-18.c: Likewise.
* gcc.target/s390/hotpatch-20.c: Likewise.
* gcc.target/s390/hotpatch-21.c: Likewise.
* gcc.target/s390/hotpatch-22.c: Likewise.
* gcc.target/s390/hotpatch-23.c: Likewise.
* gcc.target/s390/hotpatch-24.c: Likewise.
* gcc.target/s390/hotpatch-2.c: Likewise.  Adjust scan-assembler
to check for the exact nops too.
* gcc.target/s390/hotpatch-3.c: Likewise.
* gcc.target/s390/hotpatch-4.c: Likewise.
* gcc.target/s390/hotpatch-5.c: Likewise.
* gcc.target/s390/hotpatch-6.c: Likewise.
* gcc.target/s390/hotpatch-7.c: Likewise.
* gcc.target/s390/hotpatch-8.c: Likewise.
* gcc.target/s390/hotpatch-9.c: Likewise.
* gcc.target/s390/hotpatch-14.c: Likewise.
* gcc.target/s390/hotpatch-15.c: Likewise.
* gcc.target/s390/hotpatch-16.c: Likewise.
* gcc.target/s390/hotpatch-19.c: Likewise.
* gcc.target/s390/hotpatch-25.c: Likewise.  Remove
scan-assembler-times counting number of .align directives.
* gcc.target/s390/hotpatch-13.c: Remove optimization options from
dg-options.  Remove scan-assembler-times counting number of .align
directives.
* gcc.target/s390/hotpatch-26.c: New file.
* gcc.target/s390/hotpatch-27.c: New file.
* gcc.target/s390/hotpatch-28.c: New file.
* gcc.target/s390/s390.exp: Run hotpatch-*.c tests as torture tests
using -Os -O0 -O1 -O2 -O3 options.


Added:
branches/gcc-4_9-branch/gcc/testsuite/gcc.target/s390/hotpatch-26.c
branches/gcc-4_9-branch/gcc/testsuite/gcc.target/s390/hotpatch-27.c
branches/gcc-4_9-branch/gcc/testsuite/gcc.target/s390/hotpatch-28.c
Modified:
branches/gcc-4_9-branch/gcc/ChangeLog
branches/gcc-4_9-branch/gcc/config/s390/s390.c
branches/gcc-4_9-branch/gcc/testsuite/ChangeLog
branches/gcc-4_9-branch/gcc/testsuite/gcc.target/s390/hotpatch-1.c
branches/gcc-4_9-branch/gcc/testsuite/gcc.target/s390/hotpatch-10.c
branches/gcc-4_9-branch/gcc/testsuite/gcc.target/s390/hotpatch-11.c
branches/gcc-4_9-branch/gcc/testsuite/gcc.target/s390/hotpatch-12.c
branches/gcc-4_9-branch/gcc/testsuite/gcc.target/s390/hotpatch-13.c
branches/gcc-4_9-branch/gcc/testsuite/gcc.target/s390/hotpatch-14.c
branches/gcc-4_9-branch/gcc/testsuite/gcc.target/s390/hotpatch-15.c
branches/gcc-4_9-branch/gcc/testsuite/gcc.target/s390/hotpatch-16.c
branches/gcc-4_9-branch/gcc/testsuite/gcc.target/s390/hotpatch-17.c
branches/gcc-4_9-branch/gcc/testsuite/gcc.target/s390/hotpatch-18.c
branches/gcc-4_9-branch/gcc/testsuite/gcc.target/s390/hotpatch-19.c
branches/gcc-4_9-branch/gcc/testsuite/gcc.target/s390/hotpatch-2.c
branches/gcc-4_9-branch/gcc/testsuite/gcc.target/s390/hotpatch-20.c
branches/gcc-4_9-branch/gcc/testsuite/gcc.target/s390/hotpatch-21.c
branches/gcc-4_9-branch/gcc/testsuite/gcc.target/s390/hotpatch-22.c
branches/gcc-4_9-branch/gcc/testsuite/gcc.target/s390/hotpatch-23.c
branches/gcc-4_9-branch/gcc/testsuite/gcc.target/s390/hotpatch-24.c
branches/gcc-4_9-branch/gcc/testsuite/gcc.target/s390/hotpatch-25.c
branches/gcc-4_9-branch/gcc/testsuite/gcc.target/s390/hotpatch-3.c
branches/gcc-4_9-branch/gcc/testsuite/gcc.target/s390/hotpatch-4.c
branches/gcc-4_9-branch/gcc/testsuite/gcc.target/s390/hotpatch-5.c
branches/gcc-4_9-branch/gcc/testsuite/gcc.target/s390/hotpatch-6.c
branches/gcc-4_9-branch/gcc/testsuite/gcc.target/s390/hotpatch-7.c
branches/gcc-4_9-branch/gcc/testsuite/gcc.target/s390/hotpatch-8.c
branches/gcc-4_9-branch/gcc/testsuite/gcc.target/s390/hotpatch-9.c
branches/gcc-4_9-branch/gcc/testsuite/gcc.target/s390/s390.exp


[Bug target/66215] [4.8/4.9/5/6 Regression] Wrong after label NOP emission for -mhotpatch

2015-06-01 Thread krebbel at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66215

--- Comment #31 from Andreas Krebbel  ---
Author: krebbel
Date: Mon Jun  1 11:25:56 2015
New Revision: 223930

URL: https://gcc.gnu.org/viewcvs?rev=223930&root=gcc&view=rev
Log:
PR 66215: S390: Fix placement of post-label NOPs with -mhotpatch

gcc/ChangeLog:
--
2015-06-01  Dominik Vogt  

Backport from mainline
2015-05-29  Dominik Vogt  

PR target/66215
* config/s390/s390.c (s390_reorg): Fix placement of post-label NOPs
with -mhotpatch=.

gcc/testsuite/ChangeLog:

2015-06-01  Dominik Vogt  

Backport from mainline
2015-05-29  Dominik Vogt  

PR target/66215
* gcc.target/s390/hotpatch-1.c: Remove optimization options from
dg-options.
* gcc.target/s390/hotpatch-10.c: Likewise.
* gcc.target/s390/hotpatch-11.c: Likewise.
* gcc.target/s390/hotpatch-12.c: Likewise.
* gcc.target/s390/hotpatch-17.c: Likewise.
* gcc.target/s390/hotpatch-18.c: Likewise.
* gcc.target/s390/hotpatch-20.c: Likewise.
* gcc.target/s390/hotpatch-21.c: Likewise.
* gcc.target/s390/hotpatch-22.c: Likewise.
* gcc.target/s390/hotpatch-23.c: Likewise.
* gcc.target/s390/hotpatch-24.c: Likewise.
* gcc.target/s390/hotpatch-2.c: Likewise.  Adjust scan-assembler
to check for the exact nops too.
* gcc.target/s390/hotpatch-3.c: Likewise.
* gcc.target/s390/hotpatch-4.c: Likewise.
* gcc.target/s390/hotpatch-5.c: Likewise.
* gcc.target/s390/hotpatch-6.c: Likewise.
* gcc.target/s390/hotpatch-7.c: Likewise.
* gcc.target/s390/hotpatch-8.c: Likewise.
* gcc.target/s390/hotpatch-9.c: Likewise.
* gcc.target/s390/hotpatch-14.c: Likewise.
* gcc.target/s390/hotpatch-15.c: Likewise.
* gcc.target/s390/hotpatch-16.c: Likewise.
* gcc.target/s390/hotpatch-19.c: Likewise.
* gcc.target/s390/hotpatch-25.c: Likewise.  Remove
scan-assembler-times counting number of .align directives.
* gcc.target/s390/hotpatch-13.c: Remove optimization options from
dg-options.  Remove scan-assembler-times counting number of .align
directives.
* gcc.target/s390/hotpatch-26.c: New file.
* gcc.target/s390/hotpatch-27.c: New file.
* gcc.target/s390/hotpatch-28.c: New file.
* gcc.target/s390/s390.exp: Run hotpatch-*.c tests as torture tests
using -Os -O0 -O1 -O2 -O3 options.


Added:
branches/gcc-4_8-branch/gcc/testsuite/gcc.target/s390/hotpatch-26.c
branches/gcc-4_8-branch/gcc/testsuite/gcc.target/s390/hotpatch-27.c
branches/gcc-4_8-branch/gcc/testsuite/gcc.target/s390/hotpatch-28.c
Modified:
branches/gcc-4_8-branch/gcc/ChangeLog
branches/gcc-4_8-branch/gcc/config/s390/s390.c
branches/gcc-4_8-branch/gcc/testsuite/ChangeLog
branches/gcc-4_8-branch/gcc/testsuite/gcc.target/s390/hotpatch-1.c
branches/gcc-4_8-branch/gcc/testsuite/gcc.target/s390/hotpatch-10.c
branches/gcc-4_8-branch/gcc/testsuite/gcc.target/s390/hotpatch-11.c
branches/gcc-4_8-branch/gcc/testsuite/gcc.target/s390/hotpatch-12.c
branches/gcc-4_8-branch/gcc/testsuite/gcc.target/s390/hotpatch-13.c
branches/gcc-4_8-branch/gcc/testsuite/gcc.target/s390/hotpatch-14.c
branches/gcc-4_8-branch/gcc/testsuite/gcc.target/s390/hotpatch-15.c
branches/gcc-4_8-branch/gcc/testsuite/gcc.target/s390/hotpatch-16.c
branches/gcc-4_8-branch/gcc/testsuite/gcc.target/s390/hotpatch-17.c
branches/gcc-4_8-branch/gcc/testsuite/gcc.target/s390/hotpatch-18.c
branches/gcc-4_8-branch/gcc/testsuite/gcc.target/s390/hotpatch-19.c
branches/gcc-4_8-branch/gcc/testsuite/gcc.target/s390/hotpatch-2.c
branches/gcc-4_8-branch/gcc/testsuite/gcc.target/s390/hotpatch-20.c
branches/gcc-4_8-branch/gcc/testsuite/gcc.target/s390/hotpatch-21.c
branches/gcc-4_8-branch/gcc/testsuite/gcc.target/s390/hotpatch-22.c
branches/gcc-4_8-branch/gcc/testsuite/gcc.target/s390/hotpatch-23.c
branches/gcc-4_8-branch/gcc/testsuite/gcc.target/s390/hotpatch-24.c
branches/gcc-4_8-branch/gcc/testsuite/gcc.target/s390/hotpatch-25.c
branches/gcc-4_8-branch/gcc/testsuite/gcc.target/s390/hotpatch-3.c
branches/gcc-4_8-branch/gcc/testsuite/gcc.target/s390/hotpatch-4.c
branches/gcc-4_8-branch/gcc/testsuite/gcc.target/s390/hotpatch-5.c
branches/gcc-4_8-branch/gcc/testsuite/gcc.target/s390/hotpatch-6.c
branches/gcc-4_8-branch/gcc/testsuite/gcc.target/s390/hotpatch-7.c
branches/gcc-4_8-branch/gcc/testsuite/gcc.target/s390/hotpatch-8.c
branches/gcc-4_8-branch/gcc/testsuite/gcc.target/s390/hotpatch-9.c
branches/gcc-4_8-branch/gcc/testsuite/gcc.target/s390/s390.exp


[Bug target/65527] ICE: in expand_builtin_with_bounds, at builtins.c:7120 with -fcheck-pointer-bounds -mmpx

2015-06-01 Thread ienkovich at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=65527

--- Comment #2 from Ilya Enkovich  ---
Author: ienkovich
Date: Mon Jun  1 11:24:07 2015
New Revision: 223929

URL: https://gcc.gnu.org/viewcvs?rev=223929&root=gcc&view=rev
Log:
gcc/

PR target/65527
* cgraph.c (cgraph_edge::redirect_call_stmt_to_callee): Add
redirection for instrumented calls.
* lto-wrapper.c (merge_and_complain): Merge -fcheck-pointer-bounds.
(append_compiler_options): Append -fcheck-pointer-bounds.
* tree-chkp.h (chkp_copy_call_skip_bounds): New.
(chkp_redirect_edge): New.
* tree-chkp.c (chkp_copy_call_skip_bounds): New.
(chkp_redirect_edge): New.

gcc/testsuite/

PR target/65527
* gcc.target/i386/mpx/chkp-fix-calls-1.c: New.
* gcc.target/i386/mpx/chkp-fix-calls-2.c: New.
* gcc.target/i386/mpx/chkp-fix-calls-3.c: New.
* gcc.target/i386/mpx/chkp-fix-calls-4.c: New.


Added:
trunk/gcc/testsuite/gcc.target/i386/mpx/chkp-fix-calls-1.c
trunk/gcc/testsuite/gcc.target/i386/mpx/chkp-fix-calls-2.c
trunk/gcc/testsuite/gcc.target/i386/mpx/chkp-fix-calls-3.c
trunk/gcc/testsuite/gcc.target/i386/mpx/chkp-fix-calls-4.c
Modified:
trunk/gcc/ChangeLog
trunk/gcc/cgraph.c
trunk/gcc/lto-wrapper.c
trunk/gcc/testsuite/ChangeLog
trunk/gcc/tree-chkp.c
trunk/gcc/tree-chkp.h


[Bug target/66215] [4.8/4.9/5/6 Regression] Wrong after label NOP emission for -mhotpatch

2015-06-01 Thread jakub at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66215

--- Comment #30 from Jakub Jelinek  ---
IMHO it is better to keep the tests in sync between branches.


[Bug target/66215] [4.8/4.9/5/6 Regression] Wrong after label NOP emission for -mhotpatch

2015-06-01 Thread vogt at linux dot vnet.ibm.com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66215

--- Comment #29 from Dominik Vogt  ---
As this still seems to work in 4.8, 4.9 and 5.1, is it acceptable to only fix
this on the master?


[Bug ipa/66342] [6 regression] FAIL: g++.dg/ipa/ipa-icf-4.C -std=gnu++11 scan-ipa-dump icf "Equal symbols: [67]"

2015-06-01 Thread hjl.tools at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66342

H.J. Lu  changed:

   What|Removed |Added

 Status|RESOLVED|REOPENED
 Resolution|FIXED   |---

--- Comment #6 from H.J. Lu  ---
My patch only fixed:

ERROR: gcc.dg/alias-8.c: syntax error in target selector "" for " dg-warning 11
"type-punned pointer" "" { } "

not

FAIL: g++.dg/ipa/ipa-icf-4.C  -std=gnu++11  scan-ipa-dump icf "Equal symbols:
[67]"
FAIL: g++.dg/ipa/ipa-icf-4.C  -std=gnu++14  scan-ipa-dump icf "Equal symbols:
[67]"
FAIL: g++.dg/ipa/ipa-icf-4.C  -std=gnu++98  scan-ipa-dump icf "Equal symbols:
[67]"


[Bug libstdc++/66262] [REGRESSION] testsuite failure with libstdc++ (gcc-5) and g++-4.9 together

2015-06-01 Thread trippels at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66262

Markus Trippelsdorf  changed:

   What|Removed |Added

 CC||doko at gcc dot gnu.org

--- Comment #9 from Markus Trippelsdorf  ---
(In reply to Gianfranco from comment #8)
> Thanks to you Markus, I spent almost one entire week in removing code in
> order to have something "useful" for you, and this is the maximum I could
> achieve.
> 
> I don't know how much I can help you, your build failure is caused from the
> fact that you didn't rebuilt your boost framework with the new ABI?

No. It is caused by building my whole system (including Boost) with the 
new ABI. std::string parameters are mangled different in this case.

So you'll have to wail until a developer, who still uses the old ABI,
picks up this issue.


[Bug tree-optimization/66280] [4.8/4.9/5/6 Regression] ICE: in vect_get_vec_def_for_operand, at tree-vect-stmts.c:1472

2015-06-01 Thread rguenth at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66280

--- Comment #8 from Richard Biener  ---
Author: rguenth
Date: Mon Jun  1 10:37:30 2015
New Revision: 223927

URL: https://gcc.gnu.org/viewcvs?rev=223927&root=gcc&view=rev
Log:
2015-06-01  Richard Biener  

PR tree-optimization/66280
* tree-vect-slp.c (vect_detect_hybrid_slp_stmts): Fix pattern
def-use walking.

* g++.dg/torture/pr66280.C: New testcase.
* g++.dg/torture/pr66280-2.C: Likewise.

Added:
trunk/gcc/testsuite/g++.dg/torture/pr66280-2.C
trunk/gcc/testsuite/g++.dg/torture/pr66280.C
Modified:
trunk/gcc/ChangeLog
trunk/gcc/testsuite/ChangeLog
trunk/gcc/tree-vect-slp.c


  1   2   >