Re: Fortran array slices and -frepack-arrays

2018-04-13 Thread Wilco Dijkstra
Bin.Cheng wrote:   > I don't know the implementation of the option, so two questions: > 1) When the repack is done during compilation?  Is new code > manipulating data layout added > by frontend?  If yes, better to do it during optimization thus is > can be on demanding?  This > looks

Re: Dealing with default recursive procedures in Fortran

2018-04-13 Thread N.M. Maclaren
On Apr 12 2018, Thomas König wrote: with Fortran 2018, recursive is becoming the default. This will likely have a serious impact on many user codes, which often declare large arrays which could then overflow stacks, leading to segfaults without further explanation. Yes. Been there - seen

Re: Dealing with default recursive procedures in Fortran

2018-04-13 Thread Ramana Radhakrishnan
On Thu, Apr 12, 2018 at 10:50 PM, Thomas König wrote: > Hello world, > > with Fortran 2018, recursive is becoming the default. This will likely > have a serious impact on many user codes, which often declare large > arrays which could then overflow stacks, leading to segfaults

Re: GCC Compiler Optimization ignores or mistreats MFENCE memory barrier related instruction

2018-04-13 Thread Jakub Jelinek
On Fri, Apr 13, 2018 at 01:34:21PM +, Vivek Kinhekar wrote: > Hello Alexander, > > In the given testcase, the generated fdivrs instruction performs the > division of a symbol ref (memory value) by FPU Stack Register and stores > the value in FPU Stack Register. The stack registers are not

GCC Compiler Optimization ignores or mistreats MFENCE memory barrier related instruction

2018-04-13 Thread Vivek Kinhekar
Hi, We are trying to create a memory barrier with following testcase. = #include void Test() { float fDivident = 0.1f; float fResult = 0.0f; fResult = ( fDivident / fResult ); __asm volatile ("mfence" ::: "memory"); printf("\nResult: %f\n",

Re: GCC Compiler Optimization ignores or mistreats MFENCE memory barrier related instruction

2018-04-13 Thread Alexander Monakov
On Fri, 13 Apr 2018, Vivek Kinhekar wrote: > The mfence instruction with memory clobber asm instruction should create a > barrier between division and printf instructions. No, floating-point division does not touch memory, so the asm does not (and need not) restrict its motion. Alexander

Re: Dealing with default recursive procedures in Fortran

2018-04-13 Thread Janne Blomqvist
On Fri, Apr 13, 2018 at 12:50 AM, Thomas König wrote: > Hello world, > > with Fortran 2018, recursive is becoming the default. This will likely > have a serious impact on many user codes, which often declare large > arrays which could then overflow stacks, leading to segfaults

RE: GCC Compiler Optimization ignores or mistreats MFENCE memory barrier related instruction

2018-04-13 Thread Vivek Kinhekar
Thanks for the quick response, Alexander! Regards, Vivek Kinhekar +91-7709046470 -Original Message- From: Alexander Monakov Sent: Friday, April 13, 2018 5:58 PM To: Vivek Kinhekar Cc: gcc@gcc.gnu.org Subject: Re: GCC Compiler

Fortran array slices and -frepack-arrays

2018-04-13 Thread Wilco Dijkstra
Hi, I looked at a few performance anomalies between gfortran and Flang - it appears array slices are treated differently. Using -frepack-arrays fixed a performance issue in gfortran and didn't cause any regressions. Making input array slices contiguous helps both locality and enables more

RE: GCC Compiler Optimization ignores or mistreats MFENCE memory barrier related instruction

2018-04-13 Thread Vivek Kinhekar
Hello Alexander, In the given testcase, the generated fdivrs instruction performs the division of a symbol ref (memory value) by FPU Stack Register and stores the value in FPU Stack Register. Please find the following RTL Dump of the fdivrs instruction generated. It clearly access the memory

RE: GCC Compiler Optimization ignores or mistreats MFENCE memory barrier related instruction

2018-04-13 Thread Vivek Kinhekar
Oh! Thanks for the quick response, Jakub. Regards, Vivek Kinhekar -Original Message- From: Jakub Jelinek Sent: Friday, April 13, 2018 7:08 PM To: Vivek Kinhekar Cc: Alexander Monakov ; gcc@gcc.gnu.org Subject: Re:

Re: Fortran array slices and -frepack-arrays

2018-04-13 Thread Bin.Cheng
On Fri, Apr 13, 2018 at 3:32 PM, Wilco Dijkstra wrote: > Hi, > > I looked at a few performance anomalies between gfortran and Flang - it > appears array slices > are treated differently. Using -frepack-arrays fixed a performance issue in > gfortran and didn't > cause any

[Bug target/85401] New: segfault building code for VAX

2018-04-13 Thread coypu at sdf dot org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=85401 Bug ID: 85401 Summary: segfault building code for VAX Product: gcc Version: 8.0.1 Status: UNCONFIRMED Severity: normal Priority: P3 Component: target

[Bug target/85397] New: -mcet -fcf-protection doesn't work with label in nested function

2018-04-13 Thread hjl.tools at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=85397 Bug ID: 85397 Summary: -mcet -fcf-protection doesn't work with label in nested function Product: gcc Version: 8.0.1 Status: UNCONFIRMED Severity: normal

[Bug other/85398] New: g++ reports "array subscript is above array bounds" when it cannot be sure

2018-04-13 Thread patrickdepinguin at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=85398 Bug ID: 85398 Summary: g++ reports "array subscript is above array bounds" when it cannot be sure Product: gcc Version: 6.4.0 Status: UNCONFIRMED Severity:

Re: [PATCH, rs6000] (PR84302) Fix _mm_slli_epi{32,64} for shift values 16 through 31 and negative

2018-04-13 Thread Segher Boessenkool
Hi! On Thu, Apr 12, 2018 at 07:07:21PM -0500, Paul Clarke wrote: > The powerpc versions of _mm_slli_epi32 and __mm_slli_epi64 in emmintrin.h > do not properly handle shift values between 16 and 31, inclusive. > These were setting up the shift with vec_splat_s32, which only accepts > *5 bit

[PATCH v2, rs6000] (PR84302) Fix _mm_slli_epi{32,64} for shift values 16 through 31 and negative

2018-04-13 Thread Paul Clarke
The powerpc versions of _mm_slli_epi32 and __mm_slli_epi64 in emmintrin.h do not properly handle shift values between 16 and 31, inclusive. These are setting up the shift with vec_splat_s32, which only accepts *5 bit signed* shift values, or a range of -16 to 15. Values above 15 produce an error:

Re: RFA[powerpc]: patch to fix PR79916

2018-04-13 Thread Vladimir Makarov
On 04/13/2018 03:58 PM, Alexander Monakov wrote: On Fri, 13 Apr 2018, Jakub Jelinek wrote: if (reg_renumber[regno] >= 0) regno = reg_renumber[regno]; else regno = cl == NO_REGS ? -1 : ira_class_hard_regs[cl][1]; or regno =

[Bug other/85398] g++ reports "array subscript is above array bounds" when it cannot be sure

2018-04-13 Thread msebor at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=85398 Martin Sebor changed: What|Removed |Added Keywords||diagnostic, |

[PATCH] Fix CSE CLZ/CTZ handling (PR rtl-optimization/85376, variant)

2018-04-13 Thread Jakub Jelinek
On Fri, Apr 13, 2018 at 12:33:02AM +0200, Jakub Jelinek wrote: > The following patch let us punt in these cases. Bootstrapped/regtested on > x86_64-linux and i686-linux, ok for trunk? > > Another option would be to tweak simplify-rtx.c and instead of doing > else if (!

Re: RFA[powerpc]: patch to fix PR79916

2018-04-13 Thread Jakub Jelinek
On Fri, Apr 13, 2018 at 03:29:47PM -0400, Vladimir Makarov wrote: >   The attached patch fixes > > https://gcc.gnu.org/bugzilla/show_bug.cgi?id=79916 > >   The PR is about LRA cycling on some tests when SD data are used.  The > problem was in that actual assigned reg to pseudo was not in the

[Bug rtl-optimization/85393] [8 Regression] Miscompilation with hot/cold partitioning starting with r254832

2018-04-13 Thread jakub at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=85393 Jakub Jelinek changed: What|Removed |Added Status|ASSIGNED|RESOLVED Resolution|---

Re: RFA[powerpc]: patch to fix PR79916

2018-04-13 Thread Alexander Monakov
On Fri, 13 Apr 2018, Jakub Jelinek wrote: > if (reg_renumber[regno] >= 0) > regno = reg_renumber[regno]; > else > regno = cl == NO_REGS ? -1 : ira_class_hard_regs[cl][1]; > or > regno = (reg_renumber[regno] >= 0 > ? reg_renumber[regno] >

[PATCH, rs6000] Fix tests that are failing in gcc.target/powerpc/bfp with -m32

2018-04-13 Thread Kelvin Nilsen
Twelve failures have been occuring in the bfp test directory during -m32 regression testing. The cause of these failures was two-fold: 1. Patches added subsequent to development of the tests caused new error messages to be emitted that are different than the error messages expected in the

Re: [PATCH] Fix bbpart handling of EH pads (PR rtl-optimization/85393)

2018-04-13 Thread Jakub Jelinek
On Fri, Apr 13, 2018 at 09:32:07PM +0200, Eric Botcazou wrote: > > This works nicely if the landing pad bb hasn't been really modified much, > > in particular it still needs to contain only the instructions emitted > > by expand_dw2_landing_pad_for_region function call and then an unconditional >

Re: RFA[powerpc]: patch to fix PR79916

2018-04-13 Thread Segher Boessenkool
Hi! On Fri, Apr 13, 2018 at 04:43:02PM -0400, Vladimir Makarov wrote: > On 04/13/2018 03:58 PM, Alexander Monakov wrote: > >Here's another compact variant: > > > > regno = reg_renumber[regno]; > > if (regno < 0) > > regno = cl == NO_REGS ? -1 : ira_class_hard_regs[cl][1]; > >

[Bug target/85399] New: Redundant SSP clearing before rdssp

2018-04-13 Thread hjl.tools at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=85399 Bug ID: 85399 Summary: Redundant SSP clearing before rdssp Product: gcc Version: 8.0.1 Status: UNCONFIRMED Severity: normal Priority: P3 Component: target

[Bug target/83660] ICE with vec_extract inside expression statement

2018-04-13 Thread acsawdey at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=83660 --- Comment #12 from acsawdey at gcc dot gnu.org --- This function is called from cp/semantics.c maybe_cleanup_point_expr() tree fold_build_cleanup_point_expr (tree type, tree expr) { /* If the expression does not have side effects then we

[Bug target/83660] ICE with vec_extract inside expression statement

2018-04-13 Thread jakub at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=83660 --- Comment #13 from Jakub Jelinek --- (In reply to acsawdey from comment #12) > This function is called from cp/semantics.c maybe_cleanup_point_expr() > > tree > fold_build_cleanup_point_expr (tree type, tree expr) > { > /* If the expression

Re: [C++ Patch] PR 85112 ("[8 Regression] ICE with invalid constexpr")

2018-04-13 Thread Paolo Carlini
Hi, On 13/04/2018 16:06, Jason Merrill wrote: On Fri, Apr 13, 2018 at 5:05 AM, Paolo Carlini wrote: Hi, in this error-recovery regression, after a sensible error message issued by cxx_constant_init, store_init_value stores an error_mark_node as DECL_INITIAL of the

Re: [PATCH] Make redirection only for target_clones: V2 (PR ipa/85329).

2018-04-13 Thread Jakub Jelinek
On Fri, Apr 13, 2018 at 04:33:40PM +0200, Martin Liška wrote: > > Ah, but we emit the resolver only if we see a use of it. That sounds quite > > broken, resolver in each TU that uses it? Better to have one at each > > definition... > > > > Jakub > > > > So after quite some time I would

Re: [PATCH] Fix -fsanitize=address VLA instrumentation (PR sanitizer/85230)

2018-04-13 Thread Jakub Jelinek
On Fri, Apr 13, 2018 at 12:16:06AM +0200, Jakub Jelinek wrote: > Bootstrapped on > {x86_64,i686,powerpc64,powerpc64le,aarch64,s390x,armv7hl}-linux, regtested > on {x86_64,i686,powerpc64,powerpc64le}-linux so far, but on the power* ones > on virtual address space size that isn't really supported

[PATCH] Fix bbpart handling of EH pads (PR rtl-optimization/85393)

2018-04-13 Thread Jakub Jelinek
Hi! As mentioned in the comments, the .gcc_except_table format doesn't allow the throwing region and corresponding landing pad to be in different partitions, because it uses landing_pad_symbol - the start of the partition in which the throwing region is and we don't generally have relocations for

Re: [C++ Patch] PR 85112 ("[8 Regression] ICE with invalid constexpr")

2018-04-13 Thread Jason Merrill
On Fri, Apr 13, 2018 at 1:18 PM, Paolo Carlini wrote: > Hi, > > > On 13/04/2018 19:14, Jason Merrill wrote: >> >> On Fri, Apr 13, 2018 at 1:05 PM, Paolo Carlini >> wrote: >>> >>> Hi, >>> >>> On 13/04/2018 16:06, Jason Merrill wrote:

Re: [PATCH] Fix CSE CLZ/CTZ handling (PR rtl-optimization/85376, variant)

2018-04-13 Thread Eric Botcazou
> 2018-04-13 Jakub Jelinek > > PR rtl-optimization/85376 > * simplify-rtx.c (simplify_const_unary_operation): For CLZ and CTZ and > zero op0, if C?Z_DEFINED_VALUE_AT_ZERO is false, return NULL_RTX > instead of a specific value. > > *

Re: [PATCH] Fix bbpart handling of EH pads (PR rtl-optimization/85393)

2018-04-13 Thread Eric Botcazou
> This works nicely if the landing pad bb hasn't been really modified much, > in particular it still needs to contain only the instructions emitted > by expand_dw2_landing_pad_for_region function call and then an unconditional > jump or at least single successor and nothing else in the bb. How is

Re: [PATCH, rs6000] (PR84302) Fix _mm_slli_epi{32,64} for shift values 16 through 31 and negative

2018-04-13 Thread Paul Clarke
On 04/13/2018 02:37 PM, Segher Boessenkool wrote: > On Thu, Apr 12, 2018 at 07:07:21PM -0500, Paul Clarke wrote: >> The powerpc versions of _mm_slli_epi32 and __mm_slli_epi64 in emmintrin.h >> do not properly handle shift values between 16 and 31, inclusive. >> These were setting up the shift with

[Bug rtl-optimization/85393] [8 Regression] Miscompilation with hot/cold partitioning starting with r254832

2018-04-13 Thread jakub at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=85393 --- Comment #9 from Jakub Jelinek --- Author: jakub Date: Fri Apr 13 19:55:15 2018 New Revision: 259378 URL: https://gcc.gnu.org/viewcvs?rev=259378=gcc=rev Log: PR rtl-optimization/85393 * except.h

RFA[powerpc]: patch to fix PR79916

2018-04-13 Thread Vladimir Makarov
  The attached patch fixes https://gcc.gnu.org/bugzilla/show_bug.cgi?id=79916   The PR is about LRA cycling on some tests when SD data are used.  The problem was in that actual assigned reg to pseudo was not in the pseudo preferred class and this resulted in wrong generated code which LRA

[Bug rtl-optimization/85376] [8 Regression] wrong code with -Og -fno-dce -fgcse -fno-tree-ccp -fno-tree-copy-prop

2018-04-13 Thread jakub at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=85376 --- Comment #8 from Jakub Jelinek --- Author: jakub Date: Fri Apr 13 19:39:11 2018 New Revision: 259377 URL: https://gcc.gnu.org/viewcvs?rev=259377=gcc=rev Log: PR rtl-optimization/85376 * simplify-rtx.c

Re: [PATCH] Fix CSE CLZ/CTZ handling (PR rtl-optimization/85376, variant)

2018-04-13 Thread Richard Biener
On April 13, 2018 9:33:31 PM GMT+02:00, Eric Botcazou wrote: >> 2018-04-13 Jakub Jelinek >> >> PR rtl-optimization/85376 >> * simplify-rtx.c (simplify_const_unary_operation): For CLZ and CTZ >and >> zero op0, if

[Bug rtl-optimization/85376] [8 Regression] wrong code with -Og -fno-dce -fgcse -fno-tree-ccp -fno-tree-copy-prop

2018-04-13 Thread jakub at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=85376 Jakub Jelinek changed: What|Removed |Added Status|ASSIGNED|RESOLVED Resolution|---

[PATCH] rs6000 PR83660 fix ICE with vec_extract

2018-04-13 Thread Aaron Sawdey
Per the discussion on the 83660, I've come to a minimal patch to prevent this. Basically marking the vec_extract tree as having side effects later makes sure that it gets all the cleanup points it needs so that gimplify_cleanup_point_expr () is happy. Also because vec_insert puts a MODIFY_EXPR in

[Bug target/85397] -mcet -fcf-protection doesn't work with label in nested function

2018-04-13 Thread hjl.tools at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=85397 H.J. Lu changed: What|Removed |Added Status|UNCONFIRMED |NEW Last reconfirmed|

Re: [PATCH] PR 83402 Fix ICE for vec_splat_s8, vec_splat_s16, vec_splat_s32 builtins

2018-04-13 Thread Segher Boessenkool
Hi Carl, On Fri, Apr 13, 2018 at 09:49:25AM -0700, Carl Love wrote: > diff --git a/gcc/config/rs6000/rs6000.c b/gcc/config/rs6000/rs6000.c > index a0c9b5c..855be43 100644 > --- a/gcc/config/rs6000/rs6000.c > +++ b/gcc/config/rs6000/rs6000.c > @@ -16576,8 +16576,9 @@ rs6000_gimple_fold_builtin

[Bug rtl-optimization/84842] ICE in verify_target_availability, at sel-sched.c:1569

2018-04-13 Thread amonakov at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=84842 Alexander Monakov changed: What|Removed |Added CC||amonakov at gcc dot gnu.org ---

Re: [C++ Patch] PR 85112 ("[8 Regression] ICE with invalid constexpr")

2018-04-13 Thread Jason Merrill
On Fri, Apr 13, 2018 at 1:05 PM, Paolo Carlini wrote: > Hi, > > On 13/04/2018 16:06, Jason Merrill wrote: >> >> On Fri, Apr 13, 2018 at 5:05 AM, Paolo Carlini >> wrote: >>> >>> Hi, >>> >>> in this error-recovery regression, after a sensible

[PATCH] configure.ac: honor --with-gcc-major-version in gcc-driver-name.h (PR jit/85384, variant)

2018-04-13 Thread Jakub Jelinek
On Thu, Apr 12, 2018 at 04:51:21PM -0400, David Malcolm wrote: > This patch updates gcc/configure.ac to use gcc_base_ver. > > I had to drop the \$\$ from the sed expression to get it to work > within the configure script; I'm not entirely sure what their purpose > is. Without them, it's still

[Bug c++/82099] internal compiler error: in type_throw_all_p, at cp/except.c:1186 when using a function pointer for templated predicate

2018-04-13 Thread reichelt at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=82099 Volker Reichelt changed: What|Removed |Added Last reconfirmed|2017-09-04 00:00:00 |2018-4-13 CC|

[Bug rtl-optimization/79985] ICE in code_motion_path_driver, at sel-sched.c:6580

2018-04-13 Thread amonakov at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=79985 Alexander Monakov changed: What|Removed |Added Assignee|unassigned at gcc dot gnu.org |amonakov at gcc dot gnu.org

[Bug libstdc++/85396] New: _M_t._M_emplace_hint_unique

2018-04-13 Thread microprogs at mail dot ru
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=85396 Bug ID: 85396 Summary: _M_t._M_emplace_hint_unique Product: gcc Version: 6.3.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: libstdc++

[Bug c/85365] -Wrestrict false positives with -fsanitize=undefined

2018-04-13 Thread msebor at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=85365 Martin Sebor changed: What|Removed |Added Keywords||patch --- Comment #6 from Martin Sebor

[PATCH] avoid -Wrestrict for null pointers (PR 85365)

2018-04-13 Thread Martin Sebor
PR 85365 is another example of a false positive caused by the interaction between the instrumentation inserted by sanitizers, jump threading, and a middle-end warning. In this case, the warning is easy to avoid by suppressing -Wrestrict for null pointers. Although undefined, since they do no

[PATCH] PR 83402 Fix ICE for vec_splat_s8, vec_splat_s16, vec_splat_s32 builtins

2018-04-13 Thread Carl Love
GCC Maintainers: GCC revision 255549  implemented early gimple folding for the vec_splat_s[8,16,32] builtins.  However, as a consequence of the implementation, we lost error checking for out-of-range values for the expected vspltis[bhw] instructions.  The result of not having the out- of-range

Re: [C++ Patch] PR 85112 ("[8 Regression] ICE with invalid constexpr")

2018-04-13 Thread Paolo Carlini
Hi, On 13/04/2018 19:14, Jason Merrill wrote: On Fri, Apr 13, 2018 at 1:05 PM, Paolo Carlini wrote: Hi, On 13/04/2018 16:06, Jason Merrill wrote: On Fri, Apr 13, 2018 at 5:05 AM, Paolo Carlini wrote: Hi, in this error-recovery

Re: [C++ Patch] PR 85112 ("[8 Regression] ICE with invalid constexpr")

2018-04-13 Thread Paolo Carlini
Hi, On 13/04/2018 19:45, Jason Merrill wrote: Ah, I see. The problem is that even though convert_to_integer_1 was called with dofold false, we lose that when it calls convert(). Why not recurse directly to convert_to_integer_1 with the underlying type? That would avoid the undesired

Re: [PATCH] rs6000 PR83660 fix ICE with vec_extract

2018-04-13 Thread Segher Boessenkool
Hi! On Fri, Apr 13, 2018 at 03:37:08PM -0500, Aaron Sawdey wrote: > Per the discussion on the 83660, I've come to a minimal patch to > prevent this. Basically marking the vec_extract tree as having side > effects later makes sure that it gets all the cleanup points it needs > so that

Re: [C++ Patch] PR 85112 ("[8 Regression] ICE with invalid constexpr")

2018-04-13 Thread Jason Merrill
On Fri, Apr 13, 2018, 7:53 PM Paolo Carlini wrote: > Hi again, > > On 14/04/2018 00:12, Paolo Carlini wrote: > > Hi, > > > > On 13/04/2018 19:45, Jason Merrill wrote: > >> Ah, I see. The problem is that even though convert_to_integer_1 was > >> called with dofold

[Bug c++/85400] New: R_SPARC_TLS_*: invalid relocations generated for optimized builds on sparc

2018-04-13 Thread phantall at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=85400 Bug ID: 85400 Summary: R_SPARC_TLS_*: invalid relocations generated for optimized builds on sparc Product: gcc Version: unknown Status: UNCONFIRMED Severity:

[Bug target/85397] -mcet -fcf-protection doesn't work with label in nested function

2018-04-13 Thread hjl.tools at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=85397 --- Comment #3 from H.J. Lu --- builtin_longjmp has also the same issue as PR 85025. I fixed it on hjl/cet/master branch.

Re: [PATCH] [PR c++/85039] no type definitions in builtin offsetof

2018-04-13 Thread Alexandre Oliva
On Apr 11, 2018, Jason Merrill wrote: > I raised this issue with the C++ committee, and it seems that nobody > expects defining a type here to work. So let's go back to your first > patch, removing the offending part of semicolon3.C. All right, here's the adjusted patch.

[Bug target/83402] PPC64 implementation of ./rs6000/emmintrin.h gives out of range for _mm_slli_epi32

2018-04-13 Thread segher at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=83402 --- Comment #12 from Segher Boessenkool --- Author: segher Date: Fri Apr 13 23:13:40 2018 New Revision: 259380 URL: https://gcc.gnu.org/viewcvs?rev=259380=gcc=rev Log: rs6000: Fix _mm_slli_epi{32,64} for shift values 16 through 31 and negative

[PATCH] [PR c++/80290] recycle tinst garbage sooner

2018-04-13 Thread Alexandre Oliva
tinst_level objects are created during template instantiation, and they're most often quite short-lived, but since there's no intervening garbage collection, they accumulate throughout the pass while most by far could be recycled after a short while. The original testcase in PR80290, for example,

Re: [C++ Patch] PR 85112 ("[8 Regression] ICE with invalid constexpr")

2018-04-13 Thread Paolo Carlini
Hi again, On 14/04/2018 00:12, Paolo Carlini wrote: Hi, On 13/04/2018 19:45, Jason Merrill wrote: Ah, I see.  The problem is that even though convert_to_integer_1 was called with dofold false, we lose that when it calls convert(). Why not recurse directly to convert_to_integer_1 with the

[Bug tree-optimization/84737] [8 Regression] 20% degradation in CPU2000 172.mgrid starting with r256888

2018-04-13 Thread pthaugen at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=84737 --- Comment #14 from Pat Haugen --- Created attachment 43928 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=43928=edit r256888 pcom dump So the difference appears to be occurring in predictive commoning. In the ipa-cp clone,

[Bug tree-optimization/85360] FAIL: gfortran.dg/deallocate_stat.f90 -O3 -fomit-frame-pointer -funroll-loops -fpeel-loops -ftracer -finline-functions (ICE)

2018-04-13 Thread danglin at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=85360 John David Anglin changed: What|Removed |Added Status|UNCONFIRMED |RESOLVED Resolution|---

[PATCH] rs6000: Disable -m[no-]direct-move (PR85293)

2018-04-13 Thread Segher Boessenkool
The -mno-direct-move option causes a lot of problems, since it forces us to be able to generate code for p8 and up with some crucial instructions missing. This patch removes the -m[no-]direct-move options so that the user cannot put us into this unexpected situation anymore. Internally we still

[Bug middle-end/85344] Constant constraint check sign extends unsigned constant input operands

2018-04-13 Thread thopre01 at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=85344 --- Comment #5 from Thomas Preud'homme --- (In reply to Thomas Preud'homme from comment #4) > (In reply to Thomas Preud'homme from comment #3) > > More worrying is that this code compiles without error when it should error > > out: > > > > void

Re: [PATCH, rs6000] Fix tests that are failing in gcc.target/powerpc/bfp with -m32

2018-04-13 Thread Segher Boessenkool
Hi! On Fri, Apr 13, 2018 at 03:15:09PM -0500, Kelvin Nilsen wrote: > Twelve failures have been occuring in the bfp test directory during -m32 > regression testing. > This patch: > > 1. Changes the expected error messages in certain test programs. > > 2. Disables certain test programs from

Re: [PATCH v2, rs6000] (PR84302) Fix _mm_slli_epi{32,64} for shift values 16 through 31 and negative

2018-04-13 Thread Segher Boessenkool
Hi! On Fri, Apr 13, 2018 at 03:21:14PM -0500, Paul Clarke wrote: > - if (__builtin_constant_p(__B)) > - lshift = (__v4su) vec_splat_s32(__B); > + if (__builtin_constant_p(__B) && __B < 16) > +lshift = (__v4su) vec_splat_s32(__B); >else > - lshift = vec_splats

Re: [PATCH] PR 83402 Fix ICE for vec_splat_s8, vec_splat_s16, vec_splat_s32 builtins

2018-04-13 Thread Segher Boessenkool
Hi! On Fri, Apr 13, 2018 at 03:27:40PM -0700, Carl Love wrote: > On Fri, 2018-04-13 at 16:54 -0500, Segher Boessenkool wrote: > > On Fri, Apr 13, 2018 at 09:49:25AM -0700, Carl Love wrote: > > > diff --git a/gcc/config/rs6000/rs6000.c > > > b/gcc/config/rs6000/rs6000.c > > > index

Re: RFA[powerpc]: patch to fix PR79916

2018-04-13 Thread Vladimir Makarov
On 04/13/2018 05:26 PM, Segher Boessenkool wrote: Hi! On Fri, Apr 13, 2018 at 04:43:02PM -0400, Vladimir Makarov wrote: On 04/13/2018 03:58 PM, Alexander Monakov wrote: Here's another compact variant: regno = reg_renumber[regno]; if (regno < 0) regno = cl ==

[Bug target/85397] -mcet -fcf-protection doesn't work with label in nested function

2018-04-13 Thread hjl.tools at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=85397 --- Comment #2 from H.J. Lu --- Please take a look at hjl/cet/master branch at https://github.com/hjl-tools/gcc/tree/hjl/cet/master I replaced builtin_setjmp_setup and builtin_longjmp with save_stack_nonlocal and restore_stack_nonlocal to save

Re: [PATCH] [PR c++/85039] no type definitions in builtin offsetof

2018-04-13 Thread Jason Merrill
On Fri, Apr 13, 2018, 6:09 PM Alexandre Oliva wrote: > On Apr 11, 2018, Jason Merrill wrote: > > > I raised this issue with the C++ committee, and it seems that nobody > > expects defining a type here to work. So let's go back to your first > > patch,

Re: [PATCH] PR 83402 Fix ICE for vec_splat_s8, vec_splat_s16, vec_splat_s32 builtins

2018-04-13 Thread Carl Love
On Fri, 2018-04-13 at 16:54 -0500, Segher Boessenkool wrote: > Hi Carl, > > On Fri, Apr 13, 2018 at 09:49:25AM -0700, Carl Love wrote: > > diff --git a/gcc/config/rs6000/rs6000.c > > b/gcc/config/rs6000/rs6000.c > > index a0c9b5c..855be43 100644 > > --- a/gcc/config/rs6000/rs6000.c > > +++

[Bug rtl-optimization/79916] ICE in Max. number of generated reload insns per insn is achieved (90)

2018-04-13 Thread vmakarov at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=79916 --- Comment #10 from Vladimir Makarov --- Author: vmakarov Date: Fri Apr 13 22:55:16 2018 New Revision: 259379 URL: https://gcc.gnu.org/viewcvs?rev=259379=gcc=rev Log: 2018-04-13 Vladimir Makarov PR

[PATCH] PR gcc/84923 - gcc.dg/attr-weakref-1.c failed on aarch64

2018-04-13 Thread vladimir . mezentsev
From: Vladimir Mezentsev When weakref_targets is not empty a target cannot be removed from weak_decls. A small example is below when 'wv12' is removed from the weak list on aarch64: static vtype Wv12 __attribute__((weakref ("wv12"))); extern vtype wv12

[Bug c/85365] -Wrestrict false positives with -fsanitize=undefined

2018-04-13 Thread jakub at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=85365 Jakub Jelinek changed: What|Removed |Added CC||jakub at gcc dot gnu.org,

Re: [Ping, Fortran, Patch, PR81773, PR83606, coarray, v1] Fix coarray get to array with vector indexing

2018-04-13 Thread Andre Vehreschild
Ping On Sun, 8 Apr 2018 14:25:50 +0200 Andre Vehreschild wrote: > Hi all, > > attached patch fixes (to my knowledge) the two PRs 81773 and 83606 where the > result of a coarray get() operation is assigned to an array using a vector as > index. It took me quite long to get it

[Bug middle-end/81657] [8 Regression] FAIL: gcc.dg/20050503-1.c scan-assembler-not call

2018-04-13 Thread jakub at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=81657 Jakub Jelinek changed: What|Removed |Added Status|NEW |RESOLVED Resolution|---

[Bug sanitizer/85230] asan: false positives in kernel on allocas

2018-04-13 Thread dvyukov at google dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=85230 --- Comment #21 from Dmitry Vyukov --- I guess it just used my system binutils. Used to work before. I now used an older distribution to build it. Seems to work.

[Bug target/81084] [8 Regression] powerpcspe port full of confusing configury / command-line options not related to SPE

2018-04-13 Thread jakub at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=81084 --- Comment #23 from Jakub Jelinek --- We aim to do GCC 8 rc1 in the middle of next week, I'm afraid if powerpcspe is still in this sorry state by then, then it is better to remove it and re-add when/if it is in better shape. Or at least

Fix gcc.dg/debug/pr41893-1.c with Solaris ld (PR lto/81968)

2018-04-13 Thread Rainer Orth
The last LTO early debug related failure on Solaris 11 is FAIL: gcc.dg/debug/pr41893-1.c -gdwarf-2 -g3 (test for excess errors) FAIL: gcc.dg/debug/pr41893-1.c -gdwarf-2 -g3 -O (test for excess errors) FAIL: gcc.dg/debug/pr41893-1.c -gdwarf-2 -g3 -O3 (test for excess errors) Excess errors: ld:

[Bug sanitizer/85389] New: posix_memalign() crash with address sanitizer when passing invalid arguments

2018-04-13 Thread gabriel.ganne at mindmaze dot ch
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=85389 Bug ID: 85389 Summary: posix_memalign() crash with address sanitizer when passing invalid arguments Product: gcc Version: 6.3.0 Status: UNCONFIRMED Severity:

Re: [PATCH] Prefer mempcpy to memcpy on x86_64 target (PR middle-end/81657, take 2)

2018-04-13 Thread Richard Biener
On April 13, 2018 12:35:54 AM GMT+02:00, Jakub Jelinek wrote: >On Thu, Apr 12, 2018 at 07:37:22PM +0200, Jakub Jelinek wrote: >> On Thu, Apr 12, 2018 at 05:29:35PM +, Wilco Dijkstra wrote: >> > > Depending on what you mean old, I see e.g. in 2010 power7 mempcpy >got added,

[Bug c/51628] __attribute__((packed)) is unsafe in some cases

2018-04-13 Thread dingcurie at icloud dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=51628 --- Comment #51 from W.H. Ding --- (In reply to Sven from comment #49) > This doesn't work. The aligned attribute is for providing additional > alignment hints. The GCC documentation clearly states, that aligned can > increase the alignment. So

[Bug fortran/85387] [8 Regression] incorrect output with optimization /= 0

2018-04-13 Thread dominiq at lps dot ens.fr
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=85387 Dominique d'Humieres changed: What|Removed |Added Priority|P3 |P4

[Bug lto/81968] [8 regression] early lto debug objects make Solaris ld SEGV

2018-04-13 Thread ro at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=81968 Rainer Orth changed: What|Removed |Added Status|WAITING |RESOLVED Resolution|---

[Bug tree-optimization/85390] New: possible missed optimisation / regression from 6.3 with conditional expression

2018-04-13 Thread vegard.nossum at oracle dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=85390 Bug ID: 85390 Summary: possible missed optimisation / regression from 6.3 with conditional expression Product: gcc Version: 8.0.1 Status: UNCONFIRMED Keywords:

[Bug middle-end/81657] [8 Regression] FAIL: gcc.dg/20050503-1.c scan-assembler-not call

2018-04-13 Thread jakub at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=81657 --- Comment #22 from Jakub Jelinek --- Author: jakub Date: Fri Apr 13 08:35:32 2018 New Revision: 259366 URL: https://gcc.gnu.org/viewcvs?rev=259366=gcc=rev Log: PR middle-end/81657 * expr.h (enum block_op_methods): Add

[Bug lto/85391] New: [8 Regression] ICE in add_type_duplicate, at ipa-devirt.c:1887

2018-04-13 Thread marxin at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=85391 Bug ID: 85391 Summary: [8 Regression] ICE in add_type_duplicate, at ipa-devirt.c:1887 Product: gcc Version: unknown Status: UNCONFIRMED Keywords:

[Bug lto/81968] [8 regression] early lto debug objects make Solaris ld SEGV

2018-04-13 Thread ro at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=81968 --- Comment #83 from Rainer Orth --- Author: ro Date: Fri Apr 13 08:02:15 2018 New Revision: 259364 URL: https://gcc.gnu.org/viewcvs?rev=259364=gcc=rev Log: Fix gcc.dg/debug/pr41893-1.c with Solaris ld (PR lto/81968) PR lto/81968

[Bug c++/85363] Throwing exception from member constructor (brace initializer vs initializer list)

2018-04-13 Thread redi at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=85363 --- Comment #4 from Jonathan Wakely --- That implemented the rule that aggregates can't have NSDMIs. It started working in C++14 mode with r216750, which implements the C++14 rule that aggregates _can_ have NSDMIs. So the problem seems to be

[Bug tree-optimization/83991] [8 regression] gcc.dg/vect/pr79347.c fail

2018-04-13 Thread hubicka at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=83991 --- Comment #9 from Jan Hubicka --- Author: hubicka Date: Fri Apr 13 08:59:05 2018 New Revision: 259368 URL: https://gcc.gnu.org/viewcvs?rev=259368=gcc=rev Log: PR tree-optimization/82965 PR tree-optimization/83991 *

[Bug tree-optimization/82965] [8 regression] gcc.dg/vect/pr79347.c starts failing after r254379

2018-04-13 Thread hubicka at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=82965 --- Comment #15 from Jan Hubicka --- Author: hubicka Date: Fri Apr 13 08:59:05 2018 New Revision: 259368 URL: https://gcc.gnu.org/viewcvs?rev=259368=gcc=rev Log: PR tree-optimization/82965 PR tree-optimization/83991 *

[Bug lto/85391] [8 Regression] ICE in add_type_duplicate, at ipa-devirt.c:1887

2018-04-13 Thread marxin at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=85391 Martin Liška changed: What|Removed |Added Last reconfirmed||2018-4-13 Version|unknown

[Bug libgcc/85388] config/i386/morestack.S is incompatible with CET

2018-04-13 Thread igor.v.tsimbalist at intel dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=85388 --- Comment #2 from igor.v.tsimbalist at intel dot com --- You are fixing 64bit part. There is similar place for 32bit movl-8(%ebp),%eax # Restore the last register. call*-12(%ebp) # Call our

[Bug lto/85391] [8 Regression] ICE in add_type_duplicate, at ipa-devirt.c:1887

2018-04-13 Thread marxin at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=85391 --- Comment #2 from Martin Liška --- Ok so I have 6 pre-processed source files having in total ~40MB. Hope I can reduce that.

[Bug target/81685] FAIL: g++.dg/debug/dwarf2/inline-ns-2.C -std=gnu++* (internal compiler error) on darwin

2018-04-13 Thread dominiq at lps dot ens.fr
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=81685 --- Comment #2 from Dominique d'Humieres --- *** Bug 85392 has been marked as a duplicate of this bug. ***

[Bug rtl-optimization/85393] [8 Regression] Miscompilation with hot/cold partitioning starting with r254832

2018-04-13 Thread jakub at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=85393 --- Comment #1 from Jakub Jelinek --- Created attachment 43925 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=43925=edit gcc8-pr85393-test.patch Testcase in patch form.

  1   2   >