[committed][openacc] Fix SIGSEGV in oacc_entry_exit_ok_1

2019-06-16 Thread Tom de Vries
Hi, When compiling the test-case with r268755, we run into a SIGSEGV in oacc_entry_exit_ok_1 when trying to dereference a NULL red: ... struct reduction_info *red; red = reduction_phi (reduction_list, use_stmt); tree val = PHI_RESUL

[PATCH, d] Committed merge with upstream dmd 6e44734cc

2019-06-16 Thread Iain Buclaw
Hi, This patch merges the dmd frontend implementation with upstream dmd 6e44734cc, and the libdruntime sub-directory with upstream druntime cb1583b4. The patch has been split up into separate commits, so that all PRs fixed are individually referenced with the part of the patch that addresses that

[patch, fortran, committed] Improve internal compiler debugging

2019-06-16 Thread Thomas Koenig
Hi, I just committed the attached patch as obvious ans simple. No impact on user code, just to make internal debugging easier. Regards Thomas 2019-06-16 Thomas Koenig * dump_parse_tree (debug): Add verison for formal arglist. Do not crash when a gfc_expr is NULL. In

Re: Remove nonoverlapping_component_refs_of_decl_p

2019-06-16 Thread Jan Hubicka
Hi, my patch had a typo - I forgot to update the second call of truncate. This fixes it. Bootstrapped/regtested with all languages on x86_64-linux and comitted. This unbreaks non-lto Ada bootstrap failure. * tree-ssa-alias.c (nonoverlapping_component_refs_p): Fix pasto in my previo

Re: C++ PATCH for c++/60364 - noreturn after first decl not diagnosed (v2)

2019-06-16 Thread Marek Polacek
On Sat, Jun 15, 2019 at 10:39:13AM -0400, Marek Polacek wrote: > On Sat, Jun 15, 2019 at 04:33:26PM +0200, Jakub Jelinek wrote: > > On Sat, Jun 15, 2019 at 10:29:17AM -0400, Marek Polacek wrote: > > > [dcl.attr.noreturn] says "The first declaration of a function shall > > > specify the > > > noret

Re: C++ PATCH for c++/60364 - noreturn after first decl not diagnosed (v2)

2019-06-16 Thread Jakub Jelinek
On Sun, Jun 16, 2019 at 12:10:37PM -0400, Marek Polacek wrote: > > Guess I will really have to make the changes to treat [[noreturn]] similarly > > to e.g. [[nodiscard]], so that cxx11_attribute_p works. > > Thus. Changes I've made: > * don't treat [[noreturn]] as an equivalent to __attribute__((

Re: C++ PATCH for c++/60364 - noreturn after first decl not diagnosed (v3)

2019-06-16 Thread Marek Polacek
On Sun, Jun 16, 2019 at 06:18:56PM +0200, Jakub Jelinek wrote: > On Sun, Jun 16, 2019 at 12:10:37PM -0400, Marek Polacek wrote: > > > Guess I will really have to make the changes to treat [[noreturn]] > > > similarly > > > to e.g. [[nodiscard]], so that cxx11_attribute_p works. > > > > Thus. Cha

Fix aliasing_component_refs WRT trailing arrays of size 0

2019-06-16 Thread Jan Hubicka
Hi, while enabling bit more of alias oracle I have noticed that the size comparsion in aliasing_component_refs_p may lead to false negatives when struct contain trailing array of size 0. In that case the size of a an element of that array is bigger then size of the struct. This is fixed by the fol

[Darwin, committed, opts] Add RejectNegative for cases with explict inverses.

2019-06-16 Thread Iain Sandoe
These cases specify the negative option specifically, so we should not accept a regular -no- for them. tested on x86_64-darwin16, applied to mainline, thanks Iain 2019-06-16 Iain Sandoe * config/darwin.opt (prebind, noprebind, seglinkedit, noseglinkedit): Add Rejec

[Darwin, committed] The need for picsym stubs is dependent on linker used, not OS rev.

2019-06-16 Thread Iain Sandoe
This is one in a series of changes to make the operation of the Darwin back- end, depend on configuration-determined data, rather than guessing on the basis of the OS version we are generating code for. For very old toolchains, the compiler generated pic symbol stubs that provide indirections for

Re: [PATCH, sanitizer] Wrap rethrow_primary_exception (PR 87880).

2019-06-16 Thread Iain Sandoe
Hi Jakub, > On 14 Jun 2019, at 15:47, Jakub Jelinek wrote: > > On Fri, Jun 14, 2019 at 03:38:05PM +0100, Iain Sandoe wrote: >> For some Darwin versions the absence of the rethrow_primary_exception >> symbol causes almost all sanitizer tests to fail. >> >> The following patch wraps it as suggest

Re: [PATCH, sanitizer] Wrap rethrow_primary_exception (PR 87880).

2019-06-16 Thread Jakub Jelinek
On Sun, Jun 16, 2019 at 07:54:42PM +0100, Iain Sandoe wrote: > So, I guess, unless Jonathan has plans to add __cxa_rethrow_primary_exception > during the 10 time-frame, it’s correct to exclude the symbol anyway and we > should > bump the so version and apply trunk. I don't understand why they've

C++ PATCH for c++/83820 - excessive attribute arguments not detected

2019-06-16 Thread Marek Polacek
While messing with [[noreturn]] I also found out that we don't detect the case when an attribute specifier that takes no arguments contains an attribute-argument-clause. Bootstrapped/regtested on x86_64-linux, ok for trunk? 2019-06-16 Marek Polacek PR c++/83820 - excessive attribute a

Re: [PATCH] libgfortran: Use __builtin_mul_overflow in xmallocarray

2019-06-16 Thread Janne Blomqvist
On Sat, Jun 15, 2019 at 2:23 AM Steve Kargl wrote: > > On Fri, Jun 14, 2019 at 08:07:36AM -0700, Steve Kargl wrote: > > On Fri, Jun 14, 2019 at 01:08:48PM +0300, Janne Blomqvist wrote: > > > As GCC now provides builtins for doing integer overflow checking, lets > > > use it when checking for overf

[PATCH] Fix for c++/90816, c++/90809, Fixes -finstrument-functions-exclude-function-list namespace and comma handling

2019-06-16 Thread Oliver Browne
Patch fixes following PRs: c++/90816 - -finstrument-functions-exclude-function-list improperly handles namespace/class definitions c++/90809 - -finstrument-functions-exclude-function-list mishandles comma escaping Fixes as follows: At flag_instrument_functions_exclude_p [gimplify.c] Using lang_hoo

Re: Use ODR for canonical types construction in LTO

2019-06-16 Thread Jan Hubicka
Hi, here is patch that adds TYPE_ODR_P to determine type that comply C++ ODR rules (i.e. ODR types themselves or structures/unions derived from them). I have decided to use STRING_FLAG which have meaning only for integers and arrays which forced me to add type checks on places where we check STRING

[committed] pa: Fix nonlocal_goto and builtin_longjmp expanders

2019-06-16 Thread John David Anglin
The attached change fixes PR middle-end/64242 on hppa. The nonlocal_goto and builtin_longjmp expanders are reworked to restore the frame pointer last. Clobbers and a blockage are added to ensure the restored frame pointer is not used to restore the stack pointer and the branch address. Tested

Re: [PATCH][MSP430][4/4] Implement 64-bit shifts in assembly code

2019-06-16 Thread Jozef Lawrynowicz
On Thu, 6 Jun 2019 11:32:49 -0600 Jeff Law wrote: > On 6/6/19 6:42 AM, Jozef Lawrynowicz wrote: > > On Wed, 5 Jun 2019 16:35:14 -0600 > > Jeff Law wrote: > > > >> On 6/4/19 7:17 AM, Jozef Lawrynowicz wrote: > >>> libgcc/ChangeLog > >>> > >>> 2019-06-04 Jozef Lawrynowicz > >>> > >>> * c

[committed][nvptx] Fix some missing mode warnings in nvptx.md

2019-06-16 Thread Tom de Vries
Hi, Fix these warnings: ... gcc/config/nvptx/nvptx.md:748:1: warning: operand 0 missing mode? gcc/config/nvptx/nvptx.md:757:1: warning: operand 1 missing mode? gcc/config/nvptx/nvptx.md:1514:1: warning: source missing a mode? ... Build and reg-tested on x86_64 with nvptx accelerator. Committed t

[PATCH, PR d/90603] Committed fix for ICE in functionParameters

2019-06-16 Thread Iain Buclaw
Hi, This patch merges the dmd frontend implementation with upstream dmd 792f0fdf2. Backports semantic pass refactoring, fixing a number of ICEs in handling forward or recursively referenced declarations. Bootstrapped and regression tested on x86_64-linux-gnu. Committed to trunk as r272366 --

RE: [PATCH] improve ifcvt optimization (PR rtl-optimization/89430)

2019-06-16 Thread JiangNing OS
Hi, May I know any feedback comments to this patch? Thanks, -Jiangning From: Kyrill Tkachov Sent: Friday, May 24, 2019 10:55 PM To: JiangNing OS ; gcc-patches@gcc.gnu.org Cc: ebotca...@adacore.com; ste...@gcc.gnu.org; l...@redhat.com Subject: Re: [PATCH] improve ifcvt optimization (PR rtl-optim

Re: [PATCH v4 2/3] Add predict_doloop_p target hook

2019-06-16 Thread Kewen.Lin
Hi Segher and Bill, Thanks a lot for your review comments! I've updated the patch accordingly. The updated one attached. diff --git a/gcc/config/rs6000/rs6000.c b/gcc/config/rs6000/rs6000.c index 91fafc4e766..6667cd03042 100644 --- a/gcc/config/rs6000/rs6000.c +++ b/gcc/config/rs6000/rs6000.c @@

Fix ICE due to commit for PR88834

2019-06-16 Thread Kugan Vivekanandarajah
Hi All, As pointed to me by Jeff, after committing patch to fix PR88834, some tests are failing for target rx-elf. This is because in preferred_mem_scale_factor we end up with mem_mode which is BLKmode and hence GET_MODE_UNIT_SIZE returns zero. I have fixed this by checking for BLKmode. I believe

Re: [RFC] #pragma omp scan inclusive vectorization

2019-06-16 Thread Richard Biener
On Fri, 14 Jun 2019, Jakub Jelinek wrote: > Hi! > > OpenMP 5.0 introduced scan reductions, like: > #pragma omp simd reduction (inscan, +:r) > for (int i = 0; i < 1024; i++) > { > r += a[i]; > #pragma omp scan inclusive(r) > b[i] = r; > } > where there are 2 parts of

Re: Remove nonoverlapping_component_refs_of_decl_p

2019-06-16 Thread Richard Biener
On Fri, 14 Jun 2019, Jan Hubicka wrote: > > > > I think this is still error-prone since we look past > > VIEW_CONVERT_EXPRs in the path so we happily disambiguate, > > say, > > > > struct X { int e; int d; }; > > struct Y { int d; int e; }; > > > > VIEW_CONVERT(p->b).d > > VIEW_CONVERT(q->b

[nvptx] Fix missing mode warnings in nvptx.md, omp part

2019-06-16 Thread Tom de Vries
Hi Alexander, any comments? Thanks, - Tom [nvptx] Fix missing mode warnings in nvptx.md, omp part Fix these warnings: ... gcc/config/nvptx/nvptx.md:1074:1: warning: operand 0 missing mode? gcc/config/nvptx/nvptx.md:1240:1: warning: operand 0 missing mode? gcc/config/nvptx/nvptx.md:1240:1: warnin