Re: [PATCH] Fix TYPE_TYPELESS_STORAGE handling (PR middle-end/80423)

2017-04-19 Thread Jakub Jelinek
On Wed, Apr 19, 2017 at 08:22:23AM +0200, Jakub Jelinek wrote: > Here in (so far untested) patch form: > > 2017-04-19 Jakub Jelinek > > PR middle-end/80423 > * tree.h (build_array_type): Add typeless_storage default argument. > * tree.c (type_cache_hasher::equal): Also compar

[Patch, testsuite] Skip pr80170.c for non-ptr32plus targets

2017-04-19 Thread Senthil Kumar Selvaraj
Hi, The below patch skips gcc.dg/pr80170.c for targets with pointer size less than 32. The testcase uses pointer offsets that are 32 bit or higher, and this ends up triggering an ICE because a ptrofftype_p assert fires for non-ptr32 plus targets. Committed as obvious. Regards Senthil

Re: [PATCH GCC8][33/33]Fix PR69710/PR68030 by reassociate vect base address and a simple CSE pass

2017-04-19 Thread Bin.Cheng
On Wed, Apr 19, 2017 at 9:33 PM, Michael Meissner wrote: > On Wed, Apr 19, 2017 at 02:08:49PM +0100, Bin.Cheng wrote: >> Hi Michael, >> Thanks for testing it. Could you have a check if updated patch >> resolves the ICE? >> As for sms-*.c tests, I had difficulty in reproducing it. Both trunk >> a

Re: [PATCH GCC8][33/33]Fix PR69710/PR68030 by reassociate vect base address and a simple CSE pass

2017-04-19 Thread Michael Meissner
On Wed, Apr 19, 2017 at 02:08:49PM +0100, Bin.Cheng wrote: > Hi Michael, > Thanks for testing it. Could you have a check if updated patch > resolves the ICE? > As for sms-*.c tests, I had difficulty in reproducing it. Both trunk > and patched GCC have the same behavior with my local ppc cross > t

Re: [patch] Fix PR tree-optimization/80426

2017-04-19 Thread Jeff Law
On 04/19/2017 08:59 AM, Eric Botcazou wrote: I know this attempts to be a copy of what is used elsewhere, but at least there it is a result of wi::sub etc. Wouldn't it be simpler to if (sgn == SIGNED && wi::neg_p (min_op1) && wi::neg_p (wmin)) min_ovf = 1; else if (sgn == UNSIGNED && w

Re: [PATCH] PR80101: Fix ICE in store_data_bypass_p

2017-04-19 Thread Segher Boessenkool
On Tue, Apr 18, 2017 at 10:01:02PM +0200, Eric Botcazou wrote: > > There are workarounds to this problem as well: mips_store_data_bypass_p, > > added in 2006. mep_store_data_bypass_p, added in 2009 (the port has > > been removed since then, of course). > > I see, no strong opinion then, but indiv

[gomp4] add support for allocatable scalars in OpenACC declare constructs

2017-04-19 Thread Cesar Philippidis
I've applied this patch to gomp-4_0-branch to add support for fortran allocatable scalars inside OpenACC declare constructs. In order to update the declared variable on the device, the fortran FE now uses the GOMP_MAP_ALWAYS_POINTERS for declared allocatable scalars. That necessitated some minor tw

[PATCH] Implement C++17 changes to std::atomic (P0558R1 partial)

2017-04-19 Thread Jonathan Wakely
This implements the significant changes from P0558R1 for C++17, adding nested typedefs and making it ill-formed to do arithmetic on std::atomic if !is_object::value. We currently support such arithmetic for std::atomic, and even have a test checking it, so I've only made it ill-formed for C++17 m

Re: [libstdc++] Adjust to the new location of the C++ ABI

2017-04-19 Thread Jonathan Wakely
On 12/04/17 08:37 +1000, Gerald Pfeifer wrote: On Thu, 30 Mar 2017, Gerald Pfeifer wrote: (Jonathan, I'm going to take care of the libstdc++/doc links as well in case you wonder.) Done thusly. Jonathan, do you think one of the three references in doc/xml/manual/abi.xml could be avoided? That

Re: [CHKP] Fix for PR79990

2017-04-19 Thread Alexander Ivchenko
Hi, Thanks for the comments, that was a good idea to place all the logic inside of chkp_build_addr_expr function. I followed it and here is what I got: gcc/testsuite/ChangeLog: 2017-04-19 Alexander Ivchenko * gcc.target/i386/mpx/hard-reg-2-lbv.c: New test. * gcc.target/i386/m

Re: [PATCH] Fix ICE in modified_type_die (PR debug/80461)

2017-04-19 Thread Jeff Law
On 04/19/2017 10:13 AM, Jakub Jelinek wrote: On Wed, Apr 19, 2017 at 09:55:19AM -0600, Jeff Law wrote: On 04/19/2017 09:10 AM, Jakub Jelinek wrote: On Wed, Apr 19, 2017 at 08:57:52AM -0600, Jeff Law wrote: 2017-04-19 Jakub Jelinek PR debug/80461 * dwarf2out.c (modified_type

Re: [PATCH] Fix ICE in modified_type_die (PR debug/80461)

2017-04-19 Thread Jakub Jelinek
On Wed, Apr 19, 2017 at 09:55:19AM -0600, Jeff Law wrote: > On 04/19/2017 09:10 AM, Jakub Jelinek wrote: > > On Wed, Apr 19, 2017 at 08:57:52AM -0600, Jeff Law wrote: > > > > 2017-04-19 Jakub Jelinek > > > > > > > > PR debug/80461 > > > > * dwarf2out.c (modified_type_die, gen_ty

Re: [PATCH] Fix ICE in modified_type_die (PR debug/80461)

2017-04-19 Thread Jeff Law
On 04/19/2017 09:10 AM, Jakub Jelinek wrote: On Wed, Apr 19, 2017 at 08:57:52AM -0600, Jeff Law wrote: 2017-04-19 Jakub Jelinek PR debug/80461 * dwarf2out.c (modified_type_die, gen_type_die_with_usage): Check for t with zero TYPE_QUALS_NO_ADDR_SPACE. * g++.dg

Re: [PATCH] PR libstdc++/80446 cope with libc defining __has_builtin

2017-04-19 Thread Jonathan Wakely
On 19/04/17 11:49 +0100, Jonathan Wakely wrote: Both newlib and FreeBSD have this in libc headers: #ifndef __has_builtin #define __has_builtin(x) 0 #endif This means our attempts to use #ifdef __has_builtin aren't reliable, so we need a different approach. With this patch we don't care whether

Re: [PATCH] Fix ICE in modified_type_die (PR debug/80461)

2017-04-19 Thread Jakub Jelinek
On Wed, Apr 19, 2017 at 08:57:52AM -0600, Jeff Law wrote: > > 2017-04-19 Jakub Jelinek > > > > PR debug/80461 > > * dwarf2out.c (modified_type_die, gen_type_die_with_usage): > > Check for t with zero TYPE_QUALS_NO_ADDR_SPACE. > > > > * g++.dg/debug/pr80461.C: New test. > I'm go

Re: [patch] Fix PR tree-optimization/80426

2017-04-19 Thread Jakub Jelinek
On Wed, Apr 19, 2017 at 04:59:50PM +0200, Eric Botcazou wrote: > > I know this attempts to be a copy of what is used elsewhere, but > > at least there it is a result of wi::sub etc. > > Wouldn't it be simpler to > > if (sgn == SIGNED && wi::neg_p (min_op1) && wi::neg_p (wmin)) > > min_ovf = 1

Re: [patch] Fix PR tree-optimization/80426

2017-04-19 Thread Eric Botcazou
> I know this attempts to be a copy of what is used elsewhere, but > at least there it is a result of wi::sub etc. > Wouldn't it be simpler to > if (sgn == SIGNED && wi::neg_p (min_op1) && wi::neg_p (wmin)) > min_ovf = 1; > else if (sgn == UNSIGNED && wi::ne_p (min_op1, 0)) > min_ovf =

Re: [PATCH] Fix ICE in modified_type_die (PR debug/80461)

2017-04-19 Thread Jeff Law
On 04/19/2017 08:28 AM, Jakub Jelinek wrote: Hi! On the following testcase we ICE in modified_type_die, because the search for a non-qualified variant type with the same rvalue quals etc. finds pretty randomly qualified type, while modified_type_die expects that it is either an unqualified type

Re: [PATCH] doc: mention handling of {0} in -Wmissing-field-initializers (PR 71250)

2017-04-19 Thread Jeff Law
On 04/19/2017 07:12 AM, Alexander Monakov wrote: Hi, PR 71250 asks to explicitly document that -Wmissing-field-initializers warning was enhanced some time ago to suppress warnings on uses of the universal zero initializer { 0 } in C language. The documentation already calls out that the warning

Re: [PATCH] Adjust c-c++-common/opaque-vector.c testcase (PR c++/80459)

2017-04-19 Thread Jeff Law
On 04/19/2017 08:00 AM, Jakub Jelinek wrote: Hi! The testcase attempts to use long double __attribute__((vector_size (16))) vector and in addition to that uses __typeof((v PR c++/80459 * c-c++-common/opaque-vector.c (SIZEOF_MAXINT): Define. (f): Don't test long double ve

Re: [PATCH] Fix -fcompare-debug bugs during updating into loop closed ssa form (PR debug/80436)

2017-04-19 Thread Jeff Law
On 04/19/2017 07:55 AM, Jakub Jelinek wrote: Hi! -fcompare-debug fails on the following testcase, because during loop splitting we attempt to switch into loop closed SSA form and use also debug stmt uses in those decisions, which is wrong. Looking at the rest of tree-ssa-loop-manip.c, both find_

[PATCH] Fix ICE in modified_type_die (PR debug/80461)

2017-04-19 Thread Jakub Jelinek
Hi! On the following testcase we ICE in modified_type_die, because the search for a non-qualified variant type with the same rvalue quals etc. finds pretty randomly qualified type, while modified_type_die expects that it is either an unqualified type or (if there is no such a type) type itself. W

[PATCH] Adjust c-c++-common/opaque-vector.c testcase (PR c++/80459)

2017-04-19 Thread Jakub Jelinek
Hi! The testcase attempts to use long double __attribute__((vector_size (16))) vector and in addition to that uses __typeof((v PR c++/80459 * c-c++-common/opaque-vector.c (SIZEOF_MAXINT): Define. (f): Don't test long double vectors if __SIZEOF_LONG_DOUBLE__ is not

[PATCH] Fix -fcompare-debug bugs during updating into loop closed ssa form (PR debug/80436)

2017-04-19 Thread Jakub Jelinek
Hi! -fcompare-debug fails on the following testcase, because during loop splitting we attempt to switch into loop closed SSA form and use also debug stmt uses in those decisions, which is wrong. Looking at the rest of tree-ssa-loop-manip.c, both find_uses_to_rename_stmt and check_loop_closed_ssa_s

Re: [PATCH, GCC/ARM, stage4] Set mode for success result of atomic compare and swap

2017-04-19 Thread Kyrill Tkachov
Hi Thomas, On 12/04/17 09:59, Thomas Preudhomme wrote: Hi, Currently atomic_compare_and_swap_1 define_insn do not have a mode set for the destination of the set indicating the success result of the instruction. This is because the operand can be either a CC_Z register (for 32-bit targets) or a

[PATCH RFC] Check for __cxa_atexit when building native compiler

2017-04-19 Thread Kang-Che Sung
From: Explorer09 (This is my first time submitting a patch for GCC) I found the logic of use_cxa_atexit in configure script a little bit weird. It first looks up the default_use_cxa_atexit value for the target, then, for building the native compiler, checks for __cxa_atexit in libc. But, from w

[PATCH] doc: mention handling of {0} in -Wmissing-field-initializers (PR 71250)

2017-04-19 Thread Alexander Monakov
Hi, PR 71250 asks to explicitly document that -Wmissing-field-initializers warning was enhanced some time ago to suppress warnings on uses of the universal zero initializer { 0 } in C language. The documentation already calls out that the warning is silenced in C++ for '{ }', the patch adds the c

Re: [PATCH GCC8][33/33]Fix PR69710/PR68030 by reassociate vect base address and a simple CSE pass

2017-04-19 Thread Bin.Cheng
On Tue, Apr 18, 2017 at 10:25 PM, Michael Meissner wrote: > I did a bootstrap and make check-{gcc,c++,fortran,lto} comparing the results > to > the baseline (subversion id 246975). > > There were 2 differences: > > The baseline failed on gcc.dg/sms-4.c but succeeded on gcc.dg/sms-1.c. > > Here ar

Re: Fix ICE with -fauto-profile when walking vdefs

2017-04-19 Thread Richard Biener
On April 19, 2017 12:55:24 PM GMT+02:00, "Martin Liška" wrote: >On 04/18/2017 08:05 PM, Sebastian Pop wrote: >> On Mon, Apr 3, 2017 at 5:34 AM, Richard Biener >wrote: >>> On Fri, 31 Mar 2017, Sebastian Pop wrote: >>> On Fri, Mar 31, 2017 at 12:06 PM, Richard Biener > wrote: >>> Does the foll

[DOC][OBVIOUS] Fix typo in LTO documentation (PR lto/50345).

2017-04-19 Thread Martin Liška
Simple patch that's attached here: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=50345#c2 Installed as obvious. Martin >From 175a12777c8c17e9fbd0fb00c78ecb6c9c6b528e Mon Sep 17 00:00:00 2001 From: marxin Date: Wed, 19 Apr 2017 13:56:29 +0200 Subject: [PATCH] Fix typo in LTO documentation (PR lto

Re: [patch,avr] Fix PR80462

2017-04-19 Thread Denis Chertykov
2017-04-19 14:43 GMT+04:00 Georg-Johann Lay : > This PR is about an incorrect warning for variables in progmem > without initializer. If the variable is just an alias like in > and with -fmerge-all-constants > > const __flash char string1[] = "same string"; > const __flash char string2[] = "same s

[Patch, testsuite] Fix broken pr80341.c for avr

2017-04-19 Thread Senthil Kumar Selvaraj
Hi, This patch skips pr80341.c for targets with int size less than 32 bits. The assertion in the testcase holds only if sizeof(int) > sizeof(short), which isn't true for smaller int size targets like the avr. Specifically, after integer promotion, the "usual arithmetic conversion" of t

[PATCH] PR libstdc++/80448 remove noexcept from defaulted functions

2017-04-19 Thread Jonathan Wakely
Clang trunk won't compile due to a conflict between a default member initializer and "foo() noexcept = default;" so this simply removes the noexept. The defaulted constructors should still be noexcept anyway, so there's no need to explicitly require it. PR libstdc++/80448 * inclu

Re: Fix ICE with -fauto-profile when walking vdefs

2017-04-19 Thread Martin Liška
On 04/18/2017 08:05 PM, Sebastian Pop wrote: On Mon, Apr 3, 2017 at 5:34 AM, Richard Biener wrote: On Fri, 31 Mar 2017, Sebastian Pop wrote: On Fri, Mar 31, 2017 at 12:06 PM, Richard Biener wrote: Does the following fix it? Index: gcc/auto-profile.c

[PATCH] PR libstdc++/80446 cope with libc defining __has_builtin

2017-04-19 Thread Jonathan Wakely
Both newlib and FreeBSD have this in libc headers: #ifndef __has_builtin #define __has_builtin(x) 0 #endif This means our attempts to use #ifdef __has_builtin aren't reliable, so we need a different approach. With this patch we don't care whether it's defined or not, only its value. PR

[patch,avr] Fix PR80462

2017-04-19 Thread Georg-Johann Lay
This PR is about an incorrect warning for variables in progmem without initializer. If the variable is just an alias like in and with -fmerge-all-constants const __flash char string1[] = "same string"; const __flash char string2[] = "same string"; this will result in an incorrect warning: unin

Re: [PATCH, GCC, stage4] Fix type for .init_array.* and .fini_array.* sections

2017-04-19 Thread Kyrill Tkachov
Hi Thomas, On 11/04/17 18:35, Thomas Preudhomme wrote: Hi, Several tests started failing for ARM targets (eg. gcc.dg/initpri1.c) after change 6f9dbcd42f2cf034a9a21f46842c08d2e88449db in binutils. This is because the non-default priority init_array and fini_array sections are not created with NO

Re: [PATCH] IRA: Don't create new regs for debug insns (PR80429)

2017-04-19 Thread Jakub Jelinek
On Wed, Apr 19, 2017 at 02:56:47AM -0500, Segher Boessenkool wrote: > On Tue, Apr 18, 2017 at 11:47:40AM +0200, Jakub Jelinek wrote: > > On Tue, Apr 18, 2017 at 09:30:19AM +, Segher Boessenkool wrote: > > > In split_live_ranges_for_shrink_wrap IRA also splits regs that are > > > only used in de

Re: [patch] Fix PR tree-optimization/80426

2017-04-19 Thread Jakub Jelinek
On Wed, Apr 19, 2017 at 08:20:40AM +0200, Eric Botcazou wrote: > --- tree-vrp.c(revision 246960) > +++ tree-vrp.c(working copy) > @@ -2461,7 +2461,19 @@ extract_range_from_binary_expr_1 (value_ > else if (min_op0) > wmin = min_op0; > else if (min_op1) > -

Re: [PATCH, GCC/ARM, stage4] Set mode for success result of atomic compare and swap

2017-04-19 Thread Thomas Preudhomme
Stage 4 ping? Best regards, Thomas On 12/04/17 09:59, Thomas Preudhomme wrote: Hi, Currently atomic_compare_and_swap_1 define_insn do not have a mode set for the destination of the set indicating the success result of the instruction. This is because the operand can be either a CC_Z register

Re: [PATCH, GCC, stage4] Fix type for .init_array.* and .fini_array.* sections

2017-04-19 Thread Thomas Preudhomme
Stage 4 ping? Best regards, Thomas On 11/04/17 18:35, Thomas Preudhomme wrote: Hi, Several tests started failing for ARM targets (eg. gcc.dg/initpri1.c) after change 6f9dbcd42f2cf034a9a21f46842c08d2e88449db in binutils. This is because the non-default priority init_array and fini_array sectio

[PATCH] Introduce gcov.h header file (PR gcov-profile/80435).

2017-04-19 Thread Martin Liška
Hi. I discussed following patch with Jakub and Honza approved it in: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=80435#c3 Patch can bootstrap on ppc64le-redhat-linux and survives regression tests. Martin >From 1aebc17525a0e6b263212bca8f592cf2be5f923c Mon Sep 17 00:00:00 2001 From: marxin Date

[SPARC] Fix ICE on FP code in 64-bit mode

2017-04-19 Thread Eric Botcazou
(input_operand): Add comment. Return true for any memory operand when LRA is in progress. * config/sparc/sparc.c (sparc_expand_move): Minor formatting fix. 2017-04-19 Eric Botcazou Jeff Law * gcc.c-torture/compile/20170419-1.c: New test. -- Eric

Re: [PATCH] Fix TYPE_TYPELESS_STORAGE handling (PR middle-end/80423)

2017-04-19 Thread Richard Biener
On April 19, 2017 7:56:30 AM GMT+02:00, Jakub Jelinek wrote: >On Wed, Apr 19, 2017 at 07:45:36AM +0200, Richard Biener wrote: >> >As mentioned in the PR, we now use TYPE_TYPELESS_STORAGE flag on >> >ARRAY_TYPEs to denote types that need the special C++ alias >handling. >> >The problem is how is th

Re: [PATCH] IRA: Don't create new regs for debug insns (PR80429)

2017-04-19 Thread Segher Boessenkool
On Tue, Apr 18, 2017 at 11:47:40AM +0200, Jakub Jelinek wrote: > On Tue, Apr 18, 2017 at 09:30:19AM +, Segher Boessenkool wrote: > > In split_live_ranges_for_shrink_wrap IRA also splits regs that are > > only used in debug insns, leading to -fcompare-debug failures. > > > > Bootstrapped and te