Re: [PATCH] PR fortran/91715 -- Detect invalid type-spec

2019-10-10 Thread Thomas Koenig
Am 11.10.19 um 05:54 schrieb Steve Kargl: The attach patch has been tested on x86_64-*-freebsd. OK to commit. Yes. Again, thanks a lot for the patch"

Re: [PATCH] PR fortran/91649 -- Add additional checking for FINDLOC

2019-10-10 Thread Thomas Koenig
Steve, The attached patch has been tested on x86_64-*-freebsd. OK to commit? OK. Thanks a lot for the patch! Regards Thomas

Re: [PR47785] COLLECT_AS_OPTIONS

2019-10-10 Thread Kugan Vivekanandarajah
Hi Richard, Thanks for the review. On Wed, 2 Oct 2019 at 20:41, Richard Biener wrote: > > On Wed, Oct 2, 2019 at 10:39 AM Kugan Vivekanandarajah > wrote: > > > > Hi, > > > > As mentioned in the PR, attached patch adds COLLECT_AS_OPTIONS for > > passing assembler options specified with -Wa, to th

[PATCH] PR fortran/91715 -- Detect invalid type-spec

2019-10-10 Thread Steve Kargl
The attach patch has been tested on x86_64-*-freebsd. OK to commit. The attached patch detects a possibly invalid type-spec in a function declaration. Prior to this patch, the new testcase would cause an ICE. 2019-10-10 Steven G. Kargl PR fortran/91715 * decl.c (gfc_match_pr

Re: [PATCH 2/2] Documentation hyperlinks for [-Wname-of-option] (PR 87488)

2019-10-10 Thread Eric Gallager
On 10/10/19, Manuel López-Ibáñez wrote: > Hi David, > > While I agree that this is quite cool to have, the following: > >> +/* DOCUMENTATION_ROOT_URL should be supplied via -D by the Makefile >> + (see --with-documentation-root-url). >> + >> + Expect an anchor of the form "index-Wf

C++ PATCH for c++/92049 - extra error with -fchecking=2

2019-10-10 Thread Marek Polacek
The concepts merge brought this bit @@ -26326,9 +26559,9 @@ build_non_dependent_expr (tree expr) unexpected recursive instantiations. */ && !parsing_nsdmi () /* Don't do this during concept expansion either and for - the same reason. */ - && !expanding_concept ())

Re: [Patch 2/2][Arm] Implement TARGET_HOOK_SANITIZE_CLONE_ATTRIBUTES to remove cmse_nonsecure_entry

2019-10-10 Thread Ramana Radhakrishnan
On Tue, Oct 8, 2019 at 4:21 PM Andre Vieira (lists) wrote: > > Hi, > > This patch implements the TARGET_HOOK_SANITIZE_CLONE_ATTRIBUTES for the > arm backend to remove the 'cmse_nonsecure_entry' attribute from cmse. > > Bootstrapped the series on x86_64 and built arm-none-eabi, running the > cmse t

Re: [PATCH][AArch64] Set SLOW_BYTE_ACCESS

2019-10-10 Thread Ramana Radhakrishnan
On Thu, Oct 10, 2019 at 7:06 PM Richard Sandiford wrote: > > Wilco Dijkstra writes: > > ping > > > > Contrary to all documentation, SLOW_BYTE_ACCESS simply means accessing > > bitfields by their declared type, which results in better codegeneration on > > practically > > any target. > > The name

[PATCH] PR fortran/91649 -- Add additional checking for FINDLOC

2019-10-10 Thread Steve Kargl
The attached patch has been tested on x86_64-*-freebsd. OK to commit? The patch adds additional check for the ARRAY and VALUE arguments. First, ARRAY and VALUE need to be type conformant, but gfortran did not check for the CHARACTER type nor for numeric types. Second, ARRAY must be an intrinsic

Re: Type representation in CTF and DWARF

2019-10-10 Thread Indu Bhagat
On 10/09/2019 12:49 AM, Jakub Jelinek wrote: On Wed, Oct 09, 2019 at 09:41:09AM +0200, Richard Biener wrote: There's a mechanism to get type (and decl - I suppose CTF also contains debug info for function declarations not only its type?) info as part of early debug generation. The attached "h

Update DFP macros in float.h for C2x and TS 18661-2

2019-10-10 Thread Joseph Myers
GCC's includes various macros for decimal floating-point types, defined if __STDC_WANT_DEC_FP__, as defined in TR 24732. TS 18661-2 and C2X make some changes to those macros. In TS 18661-2, they are to be defined if __STDC_WANT_IEC_60559_DFP_EXT__, and the *_SUBNORMAL_MIN macros are renamed to *

Re: [PATCH][ARM] Tweak HONOR_REG_ALLOC_ORDER

2019-10-10 Thread Ramana Radhakrishnan
On Mon, Sep 9, 2019 at 6:05 PM Wilco Dijkstra wrote: > > Setting HONOR_REG_ALLOC_ORDER improves codesize with -Os, however it generates > slower and larger code with -O2 and higher. So only set it when optimizing > for > size. On Cortex-A57 this improves SPECINT2006 by 0.15% and SPECFP2006 by

Re: [PATCH][ARM] Enable arm_legitimize_address for Thumb-2

2019-10-10 Thread Ramana Radhakrishnan
On Mon, Sep 9, 2019 at 6:03 PM Wilco Dijkstra wrote: > > Currently arm_legitimize_address doesn't handle Thumb-2 at all, resulting in > inefficient code. Since Thumb-2 supports similar address offsets use the Arm > legitimization code for Thumb-2 to get significant codesize and performance > gain

[PATCH, v2] Extend subst to simplify CONST_INT inside SIGN_EXTEND.

2019-10-10 Thread Jim Wilson
This addresses PR 91860 which has four testcases triggering internal errors. The problem here is that in combine when handling debug insns, we are trying to substitute (sign_extend:DI (const_int 8160 [0x1fe0])) as the value for (reg:DI 78 [ _9 ]) in the debug insn (debug_insn 29 28 30 2 (var_locati

Re: [PATCH] V5, #2 of 15: Fix prefixed instruction length for some 128-bit types

2019-10-10 Thread Segher Boessenkool
On Wed, Oct 09, 2019 at 03:56:01PM -0400, Michael Meissner wrote: > This patch fixes the prefixed and non-prefixed instruction sizes for the > 128-bit types that aren't loaded into 128-bit vectors (TDmode, TFmode, IFmode, > PTImode). > 2019-10-08 Michael Meissner > > * config/rs6000/rs60

Re: [PATCH] V5, #1 of 15: Support 34-bit offsets for prefixed instructions

2019-10-10 Thread Segher Boessenkool
On Wed, Oct 09, 2019 at 03:52:54PM -0400, Michael Meissner wrote: > This patch adds support in the various functions that check memory offsets for > the 34-bit offset with prefixed instructions on the 'future' machine. > 2019-10-08 Michael Meissner > > * config/rs6000/rs6000.c (quad_addr

Re: [PATCH], V4, patch #9 [part of patch #4.2], Add prefixed address offset checks

2019-10-10 Thread Segher Boessenkool
On Wed, Oct 09, 2019 at 07:40:23PM -0400, Michael Meissner wrote: > On Wed, Oct 09, 2019 at 04:56:48PM -0500, Segher Boessenkool wrote: > > On Fri, Oct 04, 2019 at 08:29:11AM -0400, Michael Meissner wrote: > > > @@ -8651,6 +8675,11 @@ rs6000_legitimate_address_p (machine_mod > > >&& mode_su

[wwwdocs] Update C++ status

2019-10-10 Thread Marek Polacek
Applied to git. commit 0c282ad0b1233276cebe081a75bd6dc5ca85593d Author: Marek Polacek Date: Thu Oct 10 17:45:46 2019 -0400 Update C++ status (DRs 330, 1307, 1601 done). diff --git a/htdocs/gcc-10/changes.html b/htdocs/gcc-10/changes.html index 6b85892a..31d54871 100644 --- a/htdocs/gcc-10

Re: [PATCH] Modify simplify_truncation to handle extended CONST_INT.

2019-10-10 Thread Jim Wilson
On Thu, Oct 10, 2019 at 1:46 AM Richard Sandiford wrote: > subst tries to avoid creating invalid (zero_extend:DI (const_int N)): > > else if (CONST_SCALAR_INT_P (new_rtx) >&& (GET_CODE (x) == ZERO_EXTEND >|| GET_CODE (x) == FLOAT >

Re: C++ PATCH to merge concepts-cxx2a branch

2019-10-10 Thread Jason Merrill
On Thu, Oct 10, 2019 at 3:55 PM Christophe Lyon wrote: > On Thu, 10 Oct 2019 at 01:44, Romain Geissler > wrote: > >> Le mer. 9 oct. 2019 à 19:20, Jason Merrill a écrit : >> > >> > Andrew has done a lot of work to update the GCC implementation of C++ >> > concepts to conform to the upcoming C++2

Re: [PATCH][ARM] Switch to default sched pressure algorithm

2019-10-10 Thread Ramana Radhakrishnan
On Tue, Jul 30, 2019 at 4:16 PM Wilco Dijkstra wrote: > > Hi all, > > >On 30/07/2019 10:31, Ramana Radhakrishnan wrote: > >> On 30/07/2019 10:08, Christophe Lyon wrote: > > >>> Hi Wilco, > >>> > >>> Do you know which benchmarks were used when this was checked-in? > >>> It isn't clear from >

[PATCH] Fix multibyte-related issues in pretty-print.c (PR 91843)

2019-10-10 Thread Lewis Hyatt
Hello- This short patch addresses https://gcc.gnu.org/bugzilla/show_bug.cgi?id=91843 by adding the needed multibyte awareness to pretty-print.c. Together with my other patch awaiting review (https://gcc.gnu.org/ml/gcc-patches/2019-09/msg01627.html), this fixes all issues that I am aware of regardi

Re: [PATCH] Help compiler detect invalid code

2019-10-10 Thread Jonathan Wakely
On 01/10/19 22:05 +0200, François Dumont wrote: On 9/27/19 1:24 PM, Jonathan Wakely wrote: On 20/09/19 07:08 +0200, François Dumont wrote: I already realized that previous patch will be too controversial to be accepted. In this new version I just implement a real memmove in __memmove so A

Re: Add std::copy_n overload for istreambuf_iterator

2019-10-10 Thread François Dumont
I think this build has been done between the 2 commits I used to apply this patch (because of a problem between the chair and the keyboard). Now it should be fine. But it shows that it changed the behavior of std::copy_n as soon as the new specialization is being used. Without this change th

Re: [PATCH] Come up with ipa passes introduction in gccint documentation

2019-10-10 Thread Sandra Loosemore
On 10/9/19 1:20 AM, Jan Hubicka wrote: On Tue, Oct 8, 2019 at 10:06 PM Sandra Loosemore wrote: On 10/8/19 2:52 AM, luoxhu wrote: Hi, This is the formal documentation patch for IPA passes. Thanks. None of the IPA passes are documented in passes.texi. This patch adds a section IPA passes j

Re: Ping: [C][C++] Avoid exposing internal details in aka types

2019-10-10 Thread Marek Polacek
On Thu, Oct 10, 2019 at 08:00:53PM +0100, Richard Sandiford wrote: > Ping > > Richard Sandiford writes: > > The current aka diagnostics can sometimes leak internal details that > > seem more likely to be distracting than useful. E.g. on aarch64: > > > > void f (va_list *va) { *va = 1; } > > >

Re: C++ PATCH to merge concepts-cxx2a branch

2019-10-10 Thread Christophe Lyon
Hi, On Thu, 10 Oct 2019 at 01:44, Romain Geissler wrote: > Le mer. 9 oct. 2019 à 19:20, Jason Merrill a écrit : > > > > Andrew has done a lot of work to update the GCC implementation of C++ > > concepts to conform to the upcoming C++20 standard, which clarifies, > > removes, and changes variou

Remove splay tree form ipa-reference.c

2019-10-10 Thread Jan Hubicka
Hi, ipa-reference uses splay tree to map DECL_UIDs to trees. On other places we use hash-maps which are more sutiable. Bootstrapped/regtested x86_64-linux, comitted. Honza * ipa-reference.c: Do not include splay-tree.h (reference_vars_to_consider): Turn to hash map. (get_

[Darwin, machopic 4/n, committed] Arrange to indirect IVARs when needed.

2019-10-10 Thread Iain Sandoe
Objective C V2 (m64) IVAR offset refs from Apple GCC-4.x have an indirection for m64 code on PPC (which is the only 64b user for Mach-O PIC). Apple GCC 4.x places the indirections in the .data section, however this seems to have been unintentional - and we are placing the indirections in the non-l

Correctly release ipa-reference summarries

2019-10-10 Thread Jan Hubicka
Hi, this patch fixes code removing summaries in ipa-reference. As a memory leak it may make sense to backport this to release branches. Honza * ipa-reference.c (propagate): Fix releasing of IPA summaries. Index: ipa-reference.c

[Objective-C, NeXT ABI, committed] Identify V2 IVAR refs by metadata.

2019-10-10 Thread Iain Sandoe
For the NeXT 64b ABI, IVAR refs are supposed to be indirected for Mach-O PIC. Identify them so that we can act as needed. A follow-up patch implements the indirection. tested on x86_64-darwin16 and powerpc-darwin9 committed to mainline, thanks Iain gcc/objc/ChangeLog: 2019-10-10 Iain Sandoe

Re: [PATCH][wwwdocs] Update GCC 9 release note

2019-10-10 Thread H.J. Lu
On Thu, Oct 3, 2019 at 4:55 PM H.J. Lu wrote: > > Here is the patch to update GCC 9 release note. Is it OK? > Here is the same patch for git repo. Is it OK? Thanks. -- H.J. From 5d5ce91669258720bb47b254faa6308db3ebeed4 Mon Sep 17 00:00:00 2001 From: "H.J. Lu" Date: Thu, 10 Oct 2019 11:59:5

Ping: [C][C++] Avoid exposing internal details in aka types

2019-10-10 Thread Richard Sandiford
Ping Richard Sandiford writes: > The current aka diagnostics can sometimes leak internal details that > seem more likely to be distracting than useful. E.g. on aarch64: > > void f (va_list *va) { *va = 1; } > > gives: > > incompatible types when assigning to type ‘va_list’ {aka ‘__va_list’}

Re: PR 91770 - emit a warning in a system header

2019-10-10 Thread Marek Polacek
On Thu, Oct 10, 2019 at 02:34:36PM +0200, Jakub Jelinek wrote: > On Thu, Oct 10, 2019 at 08:24:29AM -0400, Nathan Sidwell wrote: > > In addressing 91770, I need to emit a warning for a location inside a system > > header file[1]. The diagnostics machinery elides warnings when the location > > is i

Re: [PATCH][wwwdocs] Purge CVS from gccmission.html

2019-10-10 Thread Gerald Pfeifer
On Thu, 10 Oct 2019, Kyrill Tkachov wrote: >> Not sure whether this is supposed to be a living document or just a >> record of what the mission statement was when egcs became GCC. The >> date at the top is still 1999-04-22. > Ah, I hadn't considered that. Good thing I didn't get around to > com

Re: [C++ Patch] Remove RROTATE_EXPR and LROTATE_EXPR handling

2019-10-10 Thread Paolo Carlini
Hi, On 10/10/19 19:57, Jason Merrill wrote: On 10/10/19 1:53 PM, Jakub Jelinek wrote: On Thu, Oct 10, 2019 at 06:12:02PM +0200, Paolo Carlini wrote: while working on cp_build_binary_op I noticed that the testsuite wasn't exercising the warnings in case RROTATE_EXPR / LROTATE_EXPR, even more t

Re: [PATCH][AArch64] Fix symbol offset limit

2019-10-10 Thread Richard Sandiford
Wilco Dijkstra writes: > ping > > In aarch64_classify_symbol symbols are allowed full-range offsets on > relocations. > This means the offset can use all of the +/-4GB offset, leaving no offset > available > for the symbol itself. This results in relocation overflow and link-time >

Re: [PATCH] Fix PR c++/92024

2019-10-10 Thread Marek Polacek
On Thu, Oct 10, 2019 at 06:06:40PM +, Bernd Edlinger wrote: > On 10/10/19 7:49 PM, Jason Merrill wrote: > > On 10/10/19 10:42 AM, Bernd Edlinger wrote: > >> Hi, > >> > >> this fixes a crash when -Wshadow=compatible-local is > >> enabled in the testcase g++.dg/parse/crash68.C > > > > Why does t

Re: [PATCH] Fix PR c++/92024

2019-10-10 Thread Bernd Edlinger
On 10/10/19 7:49 PM, Jason Merrill wrote: > On 10/10/19 10:42 AM, Bernd Edlinger wrote: >> Hi, >> >> this fixes a crash when -Wshadow=compatible-local is >> enabled in the testcase g++.dg/parse/crash68.C > > Why does that flag cause this crash? > gcc/cp/name-lookup.c: if (warn_shadow)

Re: [PATCH][AArch64] Set SLOW_BYTE_ACCESS

2019-10-10 Thread Richard Sandiford
Wilco Dijkstra writes: > ping > > Contrary to all documentation, SLOW_BYTE_ACCESS simply means accessing > bitfields by their declared type, which results in better codegeneration on > practically > any target. The name is confusing, but the documentation looks accurate to me: Define this m

[PATCH] V5, #15 of 15: Add (0),1 to @pcrel syntax

2019-10-10 Thread Michael Meissner
In the code gaffe I had with the V4 patches, where I mistakenly did: PADDI rt,ra,label@pcrel (which the machine does not support), it was suggested that perhaps I should add an explicit (0),1 to each @pcrel relocation, so that the assembler will flag any usage where you try to combine an

Re: [C++ Patch] Remove RROTATE_EXPR and LROTATE_EXPR handling

2019-10-10 Thread Jason Merrill
On 10/10/19 1:53 PM, Jakub Jelinek wrote: On Thu, Oct 10, 2019 at 06:12:02PM +0200, Paolo Carlini wrote: while working on cp_build_binary_op I noticed that the testsuite wasn't exercising the warnings in case RROTATE_EXPR / LROTATE_EXPR, even more the code handling those tree codes seemed comple

Re: [C++ PATCH] Partial fix for further -fstrong-eval-order issues (PR c++/91987, take 2)

2019-10-10 Thread Jason Merrill
On 10/10/19 4:13 AM, Jakub Jelinek wrote: On Mon, Oct 07, 2019 at 05:17:56PM -0400, Jason Merrill wrote: Ah, I see. And it occurs to me this situation fails condition #1 for get_formal_tmp_var anyway. So I guess the predicate direction doesn't make sense. Let's factor out the above pattern di

[PATCH] V5, #14 of 15: PC-relative tests

2019-10-10 Thread Michael Meissner
These tests add tests for PC-relative addressing with the various types. With patches #1-12 installed, these tests all pass. Can I install them into the trunk once pages 1-11 are committed? 2019-10-08 Michael Meissner * gcc/testsuite/gcc.target/powerpc/prefix-pcrel.h: New set of

Re: [C++ Patch] Remove RROTATE_EXPR and LROTATE_EXPR handling

2019-10-10 Thread Jakub Jelinek
On Thu, Oct 10, 2019 at 06:12:02PM +0200, Paolo Carlini wrote: > while working on cp_build_binary_op I noticed that the testsuite wasn't > exercising the warnings in case RROTATE_EXPR / LROTATE_EXPR, even more the > code handling those tree codes seemed completely unused. Turned out that the > C fr

[PATCH] V5, #13 of 15: Prefixed address tests with large offsets

2019-10-10 Thread Michael Meissner
These tests go through each of the types to make sure the number of expected prefixed instructions are generated. With patches #1-12 installed, these tests all pass. Can I install them into the trunck once pages 1-11 are committed? 2019-10-03 Michael Meissner * gcc/testsuite/gcc.tar

[PATCH] V5, #12 of 15: Miscellaneous prefixed address tests

2019-10-10 Thread Michael Meissner
This patch is the first of 3 patches to the test framework for the prefixed (and PC-relative) address support. This patch adds some miscellaneous tests. It also adds new target supports for prefixed addressing and PC-relative addressing. With patches #1-11 installed, these tests all pass. Can I

Re: [PATCH] Fix PR c++/92024

2019-10-10 Thread Jason Merrill
On 10/10/19 10:42 AM, Bernd Edlinger wrote: Hi, this fixes a crash when -Wshadow=compatible-local is enabled in the testcase g++.dg/parse/crash68.C Why does that flag cause this crash? Jason

Re: [PATCH][AArch64] PR79262: Adjust vector cost

2019-10-10 Thread Wilco Dijkstra
ping PR79262 has been fixed for almost all AArch64 cpus, however the example is still vectorized in a few cases, resulting in lower performance. Increase the cost of vector-to-scalar moves so it is more similar to the other vector costs. As a result -mcpu=cortex-a53 no longer vectorizes the test

Re: [PATCH 2/2] Documentation hyperlinks for [-Wname-of-option] (PR 87488)

2019-10-10 Thread Manuel López-Ibáñez
Hi David, While I agree that this is quite cool to have, the following: +/* DOCUMENTATION_ROOT_URL should be supplied via -D by the Makefile + (see --with-documentation-root-url). + + Expect an anchor of the form "index-Wfoo" e.g. + , and thus an id within + the URL

Re: [C++ Patch] Remove RROTATE_EXPR and LROTATE_EXPR handling

2019-10-10 Thread Jason Merrill
On 10/10/19 12:12 PM, Paolo Carlini wrote: Hi, while working on cp_build_binary_op I noticed that the testsuite wasn't exercising the warnings in case RROTATE_EXPR / LROTATE_EXPR, even more the code handling those tree codes seemed completely unused. Turned out that the C front-end doesn't ha

Re: [PATCH][ARM] Enable arm_legitimize_address for Thumb-2

2019-10-10 Thread Wilco Dijkstra
ping Currently arm_legitimize_address doesn't handle Thumb-2 at all, resulting in inefficient code. Since Thumb-2 supports similar address offsets use the Arm legitimization code for Thumb-2 to get significant codesize and performance gains. SPECINT2006 shows 0.4% gain on Cortex-A57, while SPECF

Re: [PATCH][ARM] Tweak HONOR_REG_ALLOC_ORDER

2019-10-10 Thread Wilco Dijkstra
ping Setting HONOR_REG_ALLOC_ORDER improves codesize with -Os, however it generates slower and larger code with -O2 and higher. So only set it when optimizing for size. On Cortex-A57 this improves SPECINT2006 by 0.15% and SPECFP2006 by 0.25% while reducing codesize. Bootstrap OK, OK for commit?

Re: [PATCH][ARM] Switch to default sched pressure algorithm

2019-10-10 Thread Wilco Dijkstra
ping Currently the Arm backend selects the alternative sched pressure algorithm. The issue is that this doesn't take register pressure into account, and so it causes significant additional spilling on Arm where there are only 14 allocatable registers. SPEC2006 shows significant codesi

Re: [PATCH][AArch64] Fix symbol offset limit

2019-10-10 Thread Wilco Dijkstra
ping In aarch64_classify_symbol symbols are allowed full-range offsets on relocations. This means the offset can use all of the +/-4GB offset, leaving no offset available for the symbol itself. This results in relocation overflow and link-time errors for simple expressions like

Re: [PATCH][AArch64] Set SLOW_BYTE_ACCESS

2019-10-10 Thread Wilco Dijkstra
ping Contrary to all documentation, SLOW_BYTE_ACCESS simply means accessing bitfields by their declared type, which results in better codegeneration on practically any target. I'm thinking we should completely remove all trace of SLOW_BYTE_ACCESS from GCC as it's confusing and useless. OK for c

Re: [patch] disentangle range_fold_*ary_expr into various pieces

2019-10-10 Thread Christophe Lyon
On Thu, 10 Oct 2019 at 17:19, Aldy Hernandez wrote: > It's not that particular commit, but the previous one, but yeah, that's > all me. Interesting, bisect really identified r276654. I think that's what Steve reported as PR 92051 (although his backtrace is different, but it's also for a differe

Re: [PATCH][ARM] Correctly set SLOW_BYTE_ACCESS

2019-10-10 Thread Wilco Dijkstra
ping Contrary to all documentation, SLOW_BYTE_ACCESS simply means accessing bitfields by their declared type, which results in better codegeneration on practically any target. So set it correctly to 1 on Arm. As a result we generate much better code for bitfields: typedef struct { int x : 2,

Re: [PATCH][ARM] Remove support for MULS

2019-10-10 Thread Wilco Dijkstra
Any further comments? Note GCC doesn't support S/UMULLS either since it is equally useless. It's no surprise that Thumb-2 removed support for flag-setting 64-bit multiplies, while AArch64 didn't add flag-setting multiplies. So there is no argument that these instructions are in any way useful to

[PATCH 1/2] pretty-print: support URL escape sequences (PR 87488)

2019-10-10 Thread David Malcolm
https://gist.github.com/egmontkob/eb114294efbcd5adb1944c9f3cb5feda describes an emerging standard for embedding URLs in escape sequences for marking up text output. This is supported e.g. by recent releases of GNOME Terminal. This patch adds support to our pretty-printing framework for emitting U

[PATCH 2/2] Documentation hyperlinks for [-Wname-of-option] (PR 87488)

2019-10-10 Thread David Malcolm
This patch uses the support for pretty-printing escaped URLs added in the previous patch (PR 87488) so that in a sufficiently capable terminal the [-Wname-of-option] emitted at the end of each diagnostic becomes a hyperlink to the documentation for that option on the GCC website. I've tested it wi

Re: [patch][OpenMP,Fortran] Fix several OpenMP use_device_addr/map/update errors found by a length test case

2019-10-10 Thread Janne Blomqvist
On Thu, Oct 10, 2019 at 7:50 PM Tobias Burnus wrote: > > Hi Jakub, > > On 10/10/19 1:55 PM, Jakub Jelinek wrote: > > What worries me about the test is that the officially only portable way > > to use it in a target region is is_device_ptr. > > How about the attached test cases? The only difference

Re: [patch][OpenMP,Fortran] Fix several OpenMP use_device_addr/map/update errors found by a length test case

2019-10-10 Thread Jakub Jelinek
On Thu, Oct 10, 2019 at 06:49:52PM +0200, Tobias Burnus wrote: > On 10/10/19 1:55 PM, Jakub Jelinek wrote: > > What worries me about the test is that the officially only portable way > > to use it in a target region is is_device_ptr. > > How about the attached test cases? The only difference is in

Re: [patch][OpenMP,Fortran] Fix several OpenMP use_device_addr/map/update errors found by a length test case

2019-10-10 Thread Tobias Burnus
Hi Jakub, On 10/10/19 1:55 PM, Jakub Jelinek wrote: What worries me about the test is that the officially only portable way to use it in a target region is is_device_ptr. How about the attached test cases? The only difference is in "module target_procs". OK now? Still, I hope the next rou

Re: [PATCH] PR libstdc++/91057 set locale::id::_M_index atomically

2019-10-10 Thread Jonathan Wakely
On 09/10/19 16:59 +0100, Jonathan Wakely wrote: If two threads see _M_index==0 concurrently they will both try to set it, potentially storing the facet at two different indices in the array. Either set the _M_index data member using an atomic compare-exchange operation or while holding a mutex.

[PATCH, alpha]: Fix PR92022, ICE in alpha_handle_trap_shadows

2019-10-10 Thread Uros Bizjak
We have to handle (skip) DEBUG_INSN in alpha_handle_trap_shadows. 2019-10-10 Uroš Bizjak PR target/92022 * config/alpha/alpha.c (alpha_handle_trap_shadows): Skip DEBUG_INSN. testsuite/ChangeLog: 2019-10-10 Uroš Bizjak PR target/92022 * g++.dg/pr92022.C: New test. Bootstr

[C++ Patch] Remove RROTATE_EXPR and LROTATE_EXPR handling

2019-10-10 Thread Paolo Carlini
Hi, while working on cp_build_binary_op I noticed that the testsuite wasn't exercising the warnings in case RROTATE_EXPR / LROTATE_EXPR, even more the code handling those tree codes seemed completely unused. Turned out that the C front-end doesn't handle those tree codes at all: I'm coming to

[SH][committed] Fix PR 88630

2019-10-10 Thread Oleg Endo
Hi, When we did the refactoring of SH's FPSCR handling back in GCC 5, we missed one thing regarding ST-40, it seems. The attached patch fixes the issue as confirmed on the real hardware. Also tested on sh-sim with make -k check RUNTESTFLAGS="--target_board=sh-sim\{-m2/-ml,-m2/-mb,- m2a/-mb,-m4/-

[Ada] Get rid of spurious error for _Tag on extension with reverse bit order

2019-10-10 Thread Pierre-Marie de Rodat
This prevents the compiler from issuing a spurious error for the _Tag component of a tagged record extension if the parent type has a Bit_Order clause specifying the reverse order and a component clause. The cause is a simple off-by-one bug in the artificial component clause synthetized for the _Ta

[Ada] Spurious warning on call with out parameter in expression function

2019-10-10 Thread Pierre-Marie de Rodat
If the exprsssion in an expression function includes a function call with an out-parameter, the corresponding assignment may be flagged as redundant because it is analyzed twice, once in the expression function and once in the body constructed for it. Running this command: gcc -c -gnatg warn.ad

[Ada] Generation of procedures for blocks occurring in elaboration code for LLVM

2019-10-10 Thread Pierre-Marie de Rodat
For compilers such as GNAT-LLVM that requiring unnesting of subprograms that make up-level references, the GNAT front end needs to check for block statements occurring within elaboration of library-level packages, and transform those into procedures that can be passed an activation-record parameter

[Ada] Unnesting issues with entry families and accept statements

2019-10-10 Thread Pierre-Marie de Rodat
The case of a protected entry family body with a nested subprogram wasn't recognized for purposes of unnesting, leading to unhandled up-level references, because Has_Nested_Subprogram was incorrectly returning False. This was due to Set_Has_Nested_Subprogram not being called on the procedure create

[Ada] Add pragma Preelaborable_Initialization to Stream_IO.File_Type

2019-10-10 Thread Pierre-Marie de Rodat
Pragma Preelaborable_Initialization is added to type File_Type in package Ada.Streams.Stream_IO, per the Binding Interpretation of AI12-0102. No other source or tool changes are required. No test needed. Tested on x86_64-pc-linux-gnu, committed on trunk 2019-10-10 Gary Dismukes gcc/ada/

[Ada] Assertion_Policy (Ignore) ignores invariants

2019-10-10 Thread Pierre-Marie de Rodat
A pragma Assertion_Policy (Ignore) was ignored with respect to invariants; invariants are checked even in the presence of this pragma. This patch fixes that bug. Running these commands: gcc -S -fverbose-asm -g ess-main.adb -gnata grep Invariant ess-main.s On the following sources: pragma As

[Ada] Fix inlining of subprograms with deep param/result in GNATprove

2019-10-10 Thread Pierre-Marie de Rodat
In the special inlining done for GNATprove, subprograms with parameters or result of deep type (i.e. containing an access type) should not be inlined. This was the purpose of a previous patch. But this should not be applied to private types whose completion has SPARK_Mode Off, as these types are no

[Ada] Handling up-level references in loops within library-level declarations

2019-10-10 Thread Pierre-Marie de Rodat
For GNAT-LLVM, we now wrap top-level loop statements in library package declaration lists within a procedure when there are nested subprograms within the loop that might make up-level references to entities of the loop (or to entities of loops and blocks nested within the outer loop for that matter

[Ada] Ensure constructor is a C++ constructor

2019-10-10 Thread Pierre-Marie de Rodat
Freeze_Subprogram has special handling of C++ constructor interfacing. This is currently implicit but assuming we introduce other conventions (e.g. Java) the current code won't hold. Tested on x86_64-pc-linux-gnu, committed on trunk 2019-10-10 Arnaud Charlet gcc/ada/ * freeze.adb (Fr

[Ada] Do not inline subprograms with deep parameter/result in GNATprove

2019-10-10 Thread Pierre-Marie de Rodat
Subprograms with a parameter or function result with deep type should not be inlined in the special mode for GNATprove, as inlining may lead to spurious violations of SPARK borrow-checking rules for pointers. There is no impact on compilation and thus no test. Tested on x86_64-pc-linux-gnu, commi

[Ada] Spurious visibility error on formal package with Abstract_State

2019-10-10 Thread Pierre-Marie de Rodat
Compiler rejects a formal package in a generic unit, when the corresponding generic package includes the SPARK aspect Abstract_State, and the name introduced by the aspect is referenced in the generic package. Tested on x86_64-pc-linux-gnu, committed on trunk 2019-10-10 Ed Schonberg gcc/ada/

[Ada] Fix awkward placement of freeze node for actual subtype

2019-10-10 Thread Pierre-Marie de Rodat
In the case where the tyoe of the formal has a predicate, the compiler generates a freeze node for the actual subtype of the formal that is placed just before the declaration of that subtype. No big deal, but awkward enough as to warrant a correction. No functional changes. Tested on x86_64-pc-l

[Ada] Spurious restriction violation on Ghost code

2019-10-10 Thread Pierre-Marie de Rodat
This patch fixes a spurious error when expanding the code for a function that appears in a Ghost context, when return return type of the function is unconstrainedm and the restriction No_Secondary_Stack is active. Running this command: gcc -c repro_main.adb On the following sources: with Boun

[Ada] Flag Sec_Stack_Used incorrectly set by ghost code

2019-10-10 Thread Pierre-Marie de Rodat
Correct an issue where ghost code will set the flag Sec_Stack_Used even though the code will be eliminated and result in the program not using the secondary stack. This could confuse the binder into importing objects from System.Secondary_Stack even though that package is not in the program's closu

[Ada] Plug minor loophole for integer named number

2019-10-10 Thread Pierre-Marie de Rodat
Analyze_Number_Declaration contains a fast track for the case where the expression of an integer named number is a literal, but it fails to set the Debug_Info_Needed flag on the named number. No functional changes. Tested on x86_64-pc-linux-gnu, committed on trunk 2019-10-10 Eric Botcazou gc

[Ada] T'Size in pragma Compile_Time_Error

2019-10-10 Thread Pierre-Marie de Rodat
If a pragma Compile_Time_Error contains T'Size, then T'Size can be computed as 0 instead of the correct value, causing missing or extra error messages. The same applies to pragma Compile_Time_Warning. This patch fixes that bug. Running these commands: gcc -c -g -O0 -gnata fillers-neq_error.ads

[Ada] 'others' in conditional_expressions

2019-10-10 Thread Pierre-Marie de Rodat
This patch fixes a bug in which an 'others' array aggregate in a dependent_expression of a conditional_expression is rejected, even in cases where 'others' is legal. See RM-4.3.3(15.1). Running this command: gcc -c others_test.ads On the following sources: package Others_Test is X : Strin

[Ada] Replace in Ordered_Maps gets tampering failure

2019-10-10 Thread Pierre-Marie de Rodat
This patch fixes a bug in which a call such as Some_Map.Replace(10, Some_Map(5)) fails a tampering check. This happens with the Some_Map(5) notation, or with the equivalent explicit call to Constant_Reference. A call to Some_Map.Delete(10, Some_Map(5)) fails in the same way. Other children of Ada.C

[Ada] Spurious visibility error in predicate in generic instance

2019-10-10 Thread Pierre-Marie de Rodat
Compilation_Unit pragmas that appear after the corresponding unit are analyzed before the declarations in the unit, in order to set proper categorization flags and verify that they are respected by those declarations. If the unit is a child unit and also the instance of a generic child unit the par

[Ada] Use declared type for deciding on SPARK pointer rules

2019-10-10 Thread Pierre-Marie de Rodat
A constant of pointer type is considered as mutable in SPARK, according to SPARK RM 3.10, but this should be based on the declared type of the constant instead of its underlying type. This rule has been already reflected in a recent commit for the Depends contract; this commit is for the Global co

Re: [patch] disentangle range_fold_*ary_expr into various pieces

2019-10-10 Thread Aldy Hernandez
It's not that particular commit, but the previous one, but yeah, that's all me. (gdb) #4 0x0145bf44 in value_range_base::lower_bound (this=0x7fffc360, pair=0) at /home/cygnus/aldyh/src/gcc/gcc/tree-vrp.c:6148 6148 return wi::to_wide (t); (gdb) #5 0x01ccb1d9 in ra

[PATCH] Fix PR c++/92024

2019-10-10 Thread Bernd Edlinger
Hi, this fixes a crash when -Wshadow=compatible-local is enabled in the testcase g++.dg/parse/crash68.C Bootstrapped and reg-tested on x86_64-pc-linux-gnu. Is it OK for trunk? Thanks Bernd. patch-pr92024.diff Description: patch-pr92024.diff

C++ PATCH for comp_ptr_ttypes_real

2019-10-10 Thread Marek Polacek
comp_ptr_ttypes_real could use bool instead of int since it only returns 0 or 1. Bootstrapped/regtested on x86_64-linux, applying to trunk. 2019-10-10 Marek Polacek * typeck.c (comp_ptr_ttypes_real): Change the return type to bool. Use false instead of 0. diff --git gcc/cp/ty

[PATCH] Fix PR92046

2019-10-10 Thread Richard Biener
The following fixes a few param adjustments that are made based on per-function adjustable flags by moving the adjustments to their users. Semantics change in some minor ways but that's allowed for --params. Bootstrapped and tested on x86_64-unknown-linux-gnu, applied. Richard. 2019-10-10 Ri

Re: [PATCH 1/2][vect]PR 88915: Vectorize epilogues when versioning loops

2019-10-10 Thread Andre Vieira (lists)
Hi, After all the discussions and respins I now believe this patch is close to what we envisioned. This patch achieves two things when vect-epilogues-nomask=1: 1) It analyzes the original loop for each supported vector size and saves this analysis per loop, as well as the vector sizes we know

Fix LTO bootstrap

2019-10-10 Thread Jan Hubicka
Hi, enabling inlining triggered lifetime-dse issue with symbol_table constructor. Bootstrapped/regtested x86_64-linux * cgraph.c (symbol_table_test::symbol_table_test): Use ggc_alloc rather than ggc_alloc_cleared to alloc symbol table. * toplev.c (general_init): Likewise.

Re: [PR 70929] IPA call type compatibility fix/workaround

2019-10-10 Thread Richard Biener
Now also to the list... On Thu, 10 Oct 2019, Richard Biener wrote: > On Thu, 10 Oct 2019, Martin Jambor wrote: > > > Hi, > > > > On Wed, Oct 09 2019, Richard Biener wrote: > > >> > > > > ... > > > > >> + /* If we only have the fntype extracted from the call statement, > > >> check it > >

Re: PR 91770 - emit a warning in a system header

2019-10-10 Thread Jakub Jelinek
On Thu, Oct 10, 2019 at 08:24:29AM -0400, Nathan Sidwell wrote: > In addressing 91770, I need to emit a warning for a location inside a system > header file[1]. The diagnostics machinery elides warnings when the location > is in a system header :( > > As I happen to have located the appropriate l

PR 91770 - emit a warning in a system header

2019-10-10 Thread Nathan Sidwell
In addressing 91770, I need to emit a warning for a location inside a system header file[1]. The diagnostics machinery elides warnings when the location is in a system header :( As I happen to have located the appropriate line_map in the process of determining the nested extern "C", I could c

Re: Make C2X imply -fno-fp-int-builtin-inexact

2019-10-10 Thread Rainer Orth
Hi Iain, >>> I’m not quite sure what you’re proposing here (probably missing something >>> obvious). >> >> At the moment, gcc/testsuite/lib/target-supports.exp >> (add_options_for_c99_runtime) adds -mmacosx-version-min=10.3 to the >> testcase flags on powerpc-*-darwin*. Since, as Joseph mentioned

Re: [patch][OpenMP,Fortran] Fix several OpenMP use_device_addr/map/update errors found by a length test case

2019-10-10 Thread Jakub Jelinek
On Tue, Oct 08, 2019 at 01:11:53AM +0200, Tobias Burnus wrote: > gcc/fortran/ > * f95-lang.c (LANG_HOOKS_OMP_IS_ALLOCATABLE_OR_PTR): Re-define to > gfc_omp_is_allocatable_or_ptr. > * trans-decl.c (create_function_arglist): Set GFC_DECL_OPTIONAL_ARGUMENT > only if not p

Re: Make C2X imply -fno-fp-int-builtin-inexact

2019-10-10 Thread Iain Sandoe
Hi Rainer, Rainer Orth wrote: Rainer Orth wrote: No idea about Darwin/PowerPC though. Right now, anything < 10.4 is not a viable host (without jumping through a lot of hoops, regardless of the c99 requirements)... … but It would be good to continue to support these earlier versions as

  1   2   >