[PATCH] c: [PR32122] Require pointer types for computed gotos

2021-09-19 Thread apinski--- via Gcc-patches
From: Andrew Pinski So GCC has always accepted non-pointer types in computed gotos but that was wrong based on the documentation: Any expression of type void * is allowed. So this fixes the problem by requiring the type to be a pointer type. OK? Bootstrapped and tested on x86_64-linux-gnu with

[PATCH, Fortran] Fix testcases that violate C838, + revealed ICE

2021-09-19 Thread Sandra Loosemore
This patch fixes 3 testcases that violate F2018 C838 by passing an assumed-rank argument to a procedure via an assumed-sized dummy, by wrapping the call in a SELECT RANK construct. But wait, there's more! This triggered an ICE due to a null pointer dereference in the code that handles the

[PATCH, Fortran] Fixes for F2018 C838 (PR fortran/101334)

2021-09-19 Thread Sandra Loosemore
This patch fixes some bugs in handling of assumed-rank arguments revealed by the TS29113 testsuite, allowing xfails to be removed from those testcases. It was previously failing to diagnose an error when passing an assumed-rank argument to a procedure via a non-assumed-rank dummy, and giving

[committed] avoid assuming cfun is nonnull [PR102243]

2021-09-19 Thread Martin Sebor via Gcc-patches
After the front end passes control to the middle end cfun is never null (I'm pretty sure) but when a middle end helper is called from the C++ front end cfun can be null for a namespace scope initializer expression. A recent change of mine to the helper introduced an assumption to the contrary,

Re: [PATCH] introduce predicate analysis class

2021-09-19 Thread Martin Sebor via Gcc-patches
On 9/18/21 3:14 PM, Martin Sebor wrote: On 9/18/21 12:46 PM, Martin Sebor wrote: On 9/17/21 10:08 PM, Jeff Law wrote: On 9/17/2021 4:05 PM, Martin Sebor wrote: On 9/2/21 10:28 AM, Jeff Law via Gcc-patches wrote: On 8/30/2021 2:03 PM, Martin Sebor via Gcc-patches wrote: The predicate

Re: [PATCH] Factor out `find_a_program` helper around `find_a_file`

2021-09-19 Thread Iain Sandoe
> On 19 Sep 2021, at 16:10, Jeff Law via Gcc-patches > wrote: > > > > On 8/4/2021 12:21 PM, John Ericson wrote: >> The helper is for `--print-prog-name` and similar things. Since all >> executable finding goes through it, we can move the default overrides >> into that path too. This also

Re: [PATCH] Enable auto-vectorization at O2 with very-cheap cost model.

2021-09-19 Thread Martin Sebor via Gcc-patches
On 9/16/21 3:03 AM, Hongtao Liu via Gcc-patches wrote: On Thu, Sep 16, 2021 at 4:23 PM Richard Biener via Gcc-patches wrote: On Thu, 16 Sep 2021, liuhongt wrote: Ping rebased on latest trunk. gcc/ChangeLog: * common.opt (ftree-vectorize): Add Var(flag_tree_vectorize). *

[pushed] libgcc, Darwin: Remove unused symlinks.

2021-09-19 Thread Iain Sandoe
Hi These were used on older systems to equate the FAT libgcc_s library to single-slice equivalents. Unused for any current system and never emitted by GCC. tested on x86_64, i686 darwin and x86_64-linux (,m32) pushed to master, thanks Iain Signed-off-by: Iain Sandoe libgcc/ChangeLog:

[pushed] libgcc, X86, Darwin: Handle symbols for HF cases.

2021-09-19 Thread Iain Sandoe
Hi This reorganises the Darwin symbol vers files to include the generic ones at the top level; allowing for arch ports to override (via either exclusion or inclusion as needed). We add an X86-specific vers file containing the new HF symbols. Note that although Darwin does not use ELF-style

[pushed] Darwin, crts: Build Darwin10 unwinder shim as a library.

2021-09-19 Thread Iain Sandoe
Hi, We have a small unwinder shim that is only used for Darwin10 (and only then in quite specific cases). To avoid linking this code for every executable or DSO, we can present the crt as a convenience library (rather than a .o file). tested on x86_64-darwin10,18, x86_64-linux-gnu pushed to

[committed] Make test names unique for a couple of goacc tests

2021-09-19 Thread Jeff Law via Gcc-patches
A couple of goacc tests do not have unique names.  This causes problems for the test comparison script when one of the test passes and the other fails -- in this scenario the test comparison script claims there is a regression. This slipped through for a while because I had turned off

Re: [PATCH] c-family: Add more predefined macros for math flags

2021-09-19 Thread Jeff Law via Gcc-patches
On 6/30/2021 2:59 AM, Matthias Kretz wrote: Library code, especially in headers, sometimes needs to know how the compiler interprets / optimizes floating-point types and operations. This information can be used for additional optimizations or for ensuring correctness. This change makes

Re: [PATCH] Recognize highpart multiplication during RTL expansion

2021-09-19 Thread Jeff Law via Gcc-patches
On 8/8/2021 4:48 AM, Roger Sayle wrote: This middle-end patch teaches RTL expansion to recognize widening multiplications followed by right shifts as highpart multiplications, and attempt to emit them using the backends [su]mul_highpart optab if possible. My first attempt at supporting this,

Re: obstack.h __PTR_ALIGN vs. ubsan

2021-09-19 Thread Jeff Law via Gcc-patches
On 9/1/2021 10:03 PM, Alan Modra via Binutils wrote: Current ubsan complains on every use of __PTR_ALIGN (when ptrdiff_t is as large as a pointer), due to making calculations relative to a NULL pointer. This patch avoids the problem by extracting out and simplifying __BPTR_ALIGN for the

Re: [Patch][doc][PR101843]clarification on building gcc and binutils together

2021-09-19 Thread Jeff Law via Gcc-patches
On 9/9/2021 9:05 AM, Qing Zhao wrote: Hi, Jeff, Sorry for the late reply. The following is the reply from John Henning and the updated patch based on your suggestions, Please take a look and let us know any issue there. I would strongly recommend removing all the documentation related to

Re: [PATCH 2/2] Update the section on binutils version

2021-09-19 Thread Jeff Law via Gcc-patches
On 9/17/2021 7:21 PM, apinski--- via Gcc-patches wrote: From: Andrew Pinski LTO usage requires binutils 2.35 or newer due to https://sourceware.org/PR25355. This adds a note in the prerequisites page about it. Ok? gcc/ChangeLog: * doc/install.texi: Add note about binutils

Re: [PATCH 1/2] Fix PR bootstrap/102389: --with-build-config=bootstrap-lto is broken

2021-09-19 Thread Jeff Law via Gcc-patches
On 9/17/2021 7:21 PM, apinski--- via Gcc-patches wrote: From: Andrew Pinski So the problem here is that now the lto-plugin requires NM that works with LTO to work so we need to pass down NM just like we do for ranlib and ar. OK? Bootstrapped and tested with

Re: [PATCH] Loop unswitching: support gswitch statements.

2021-09-19 Thread Jeff Law via Gcc-patches
On 9/15/2021 2:46 AM, Martin Liška wrote: Hello. The patch extends the loop unswitching pass so that gswitch statements are supported. The pass now uses ranger which marks switch edges that are known to be unreachable in a versioned loop. Patch can bootstrap on x86_64-linux-gnu and survives

Re: [PATCH] Jit, testsuite: Amend expect processing to tolerate more platforms.

2021-09-19 Thread Iain Sandoe
Hi David, > On 2 Sep 2021, at 15:47, David Malcolm wrote: > > On Thu, 2021-08-19 at 19:59 +0100, Iain Sandoe wrote: >> >> tested on i686, x86_64-darwin, x86_64,powerpc64-linux, > > Which versions of DejaGnu, BTW? framework 1.5, 1.5.1, 1.6.2 expect 5.45 / 5.45.4 / 5.45r2(darwin) (various

Re: [PATCH] avr: Add atmega324pb MCU

2021-09-19 Thread Matwey V. Kornilov via Gcc-patches
вс, 19 сент. 2021 г. в 18:06, Jeff Law : > > > > On 6/13/2021 12:42 PM, Matwey V. Kornilov via Gcc-patches wrote: > > Reference: https://www.microchip.com/wwwproducts/en/ATMEGA324PB > Signed-off-by: Matwey V. Kornilov > --- > gcc/config/avr/avr-mcus.def | 1 + > gcc/doc/avr-mmcu.texi | 2

[COMMITTED] Make dump_ranger routines externally visible.

2021-09-19 Thread Aldy Hernandez via Gcc-patches
There was an inline extern declaration for dump_ranger that was a bit of a hack. I've removed it in favor of an actual prototype. There are also some trivial changes to the dumping code in the path solver. gcc/ChangeLog: * gimple-range-path.cc (path_range_query::path_range_query): Add

Re: [PATCH] Minor cleanups to forward threader.

2021-09-19 Thread Jeff Law via Gcc-patches
On 9/19/2021 9:37 AM, Aldy Hernandez wrote: Every time we allocate a threading edge we push it onto the path in a distinct step. There's no need to do this in two steps, and avoiding this, keeps us from exposing the internals of the registry. I've also did some tiny cleanups in

[PATCH] Minor cleanups to forward threader.

2021-09-19 Thread Aldy Hernandez via Gcc-patches
Every time we allocate a threading edge we push it onto the path in a distinct step. There's no need to do this in two steps, and avoiding this, keeps us from exposing the internals of the registry. I've also did some tiny cleanups in thread_across_edge, most importantly removing the bitmap in

Re: [PATCH] Simplify paradoxical subreg extensions of TRUNCATE

2021-09-19 Thread Jeff Law via Gcc-patches
On 9/6/2021 8:24 AM, Segher Boessenkool wrote: Hi! On Mon, Sep 06, 2021 at 12:32:13PM +0100, Roger Sayle wrote: I think the current documentation is sufficient. During compilation, GCC's combine pass will often substitute a register with an expression defining it's value, and then attempt

Re: [PATCH] Factor out `find_a_program` helper around `find_a_file`

2021-09-19 Thread Jeff Law via Gcc-patches
On 8/4/2021 12:21 PM, John Ericson wrote: The helper is for `--print-prog-name` and similar things. Since all executable finding goes through it, we can move the default overrides into that path too. This also ensures that if some is looking for a *non*-program that called `as`, `ld`, etc.,

Re: [PATCH] avr: Add atmega324pb MCU

2021-09-19 Thread Jeff Law via Gcc-patches
On 6/13/2021 12:42 PM, Matwey V. Kornilov via Gcc-patches wrote: Reference:https://www.microchip.com/wwwproducts/en/ATMEGA324PB Signed-off-by: Matwey V. Kornilov --- gcc/config/avr/avr-mcus.def | 1 + gcc/doc/avr-mmcu.texi | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-)

Re: [PATCH] PCH large file bug

2021-09-19 Thread Jeff Law via Gcc-patches
On 5/19/2021 10:19 PM, Evgeniy via Gcc-patches wrote: Hello, can I ask somebody to push the patch to fix the PCH large file problem (BUG 14940)? The bug fix was sent in https://gcc.gnu.org/bugzilla/show_bug.cgi?id=14940#c49 and https://gcc.gnu.org/bugzilla/show_bug.cgi?id=14940#c50 I would

Re: [PATCH] testsuite: Remove .exe suffix in prune_gcc_output

2021-09-19 Thread Jeff Law via Gcc-patches
On 9/8/2021 2:49 AM, Christophe Lyon via Gcc-patches wrote: When running the testsuite under Windows, we noticed failures in testcase which attempt to match compiler error messages containing the name of the executable. For instance, gcc.dg/analyzer/signal-4a.c tries to match 'cc1:' which

Re: [PATCH] flag_complex_method: support optimize attribute

2021-09-19 Thread Jeff Law via Gcc-patches
On 9/7/2021 3:42 AM, Martin Liška wrote: On 9/6/21 14:16, Richard Biener wrote: On Mon, Sep 6, 2021 at 1:46 PM Jakub Jelinek wrote: On Mon, Sep 06, 2021 at 01:37:46PM +0200, Martin Liška wrote: --- a/gcc/opts.c +++ b/gcc/opts.c @@ -1323,6 +1323,14 @@ finish_options (struct gcc_options