Re: [PATCH, Modula-2 (C/C++/D/F/Go/Jit)] (Register spec fn) (v2)

2019-06-29 Thread Gaius Mulley
Richard Sandiford writes: > Thanks for the patch and sorry for the slow reply. > > Gaius Mulley writes: >> Hello, >> >> here is version two of the patches which introduce Modula-2 into the >> GCC trunk. The patches include: >> >> (*) a patch to allow all front ends to register a lang spec fu

[PATCH] Make lto-dump dump symtab callgraph in graphviz format

2019-06-29 Thread Giuliano Belinassi
This patch makes lto-dump dump the symbol table callgraph in graphviz format. I've not added any test to this because I couldn't find a way to call lto-dump from the testsuite. Also, any feedback with regard to how can I improve this is welcome. gcc/ChangeLog 2019-06-29 Giuliano Belinass

Re: [PATCH, Modula-2 (C/C++/D/F/Go/Jit)] (Register spec fn) (v2)

2019-06-29 Thread Segher Boessenkool
Hi Gaius, On Fri, Jun 14, 2019 at 02:09:48PM +0100, Gaius Mulley wrote: > here is version two of the patches which introduce Modula-2 into the > GCC trunk. The patches include: > > (*) a patch to allow all front ends to register a lang spec function. >(included are patches for all fro

Re: [PATCH] Fix 2 clang warnings.

2019-06-29 Thread Segher Boessenkool
On Thu, Jun 27, 2019 at 08:49:50AM -0600, Martin Sebor wrote: > On 6/27/19 8:21 AM, Martin Liška wrote: > >/home/marxin/Programming/gcc/gcc/ggc-page.c:946:60: warning: format > >specifies type 'void *' but the argument has type 'char *' > >[-Wformat-pedantic] > > I'm normally in favor of cleanin

Re: Fix ICE due to commit for PR88834

2019-06-29 Thread Segher Boessenkool
On Mon, Jun 17, 2019 at 01:13:43PM -0600, Jeff Law wrote: > > (Hopefully one day GET_MODE_SIZE & co. will assert on BLKmode and VOIDmode.) > Yea. Not sure why. There's probably a compile-time hit, but I suspect > it'd turn up some interesting bugs. There turn out to be at least twenty or so plac

Re: [PATCH, Modula-2 (C/C++/D/F/Go/Jit)] (Register spec fn) (v2)

2019-06-29 Thread Richard Biener
On June 29, 2019 12:15:17 PM GMT+02:00, Richard Sandiford wrote: >Thanks for the patch and sorry for the slow reply. > >Gaius Mulley writes: >> Hello, >> >> here is version two of the patches which introduce Modula-2 into the >> GCC trunk. The patches include: >> >> (*) a patch to allow all

Re: [patch] Reimplement GNU threads library on native Windows

2019-06-29 Thread Jonathan Wakely
On 28/06/19 12:46 +0200, Eric Botcazou wrote: +/* The implementation strategy for the c++0x thread support is as follows. s/c++0x/c++11/ please, it hasn't been 0x for eight years now :-) I haven't reviewed the rest yet, that just jumped out at me during a quick skim of the patch.

Re: [PATCH, Modula-2 (C/C++/D/F/Go/Jit)] (Register spec fn) (v2)

2019-06-29 Thread Richard Sandiford
Thanks for the patch and sorry for the slow reply. Gaius Mulley writes: > Hello, > > here is version two of the patches which introduce Modula-2 into the > GCC trunk. The patches include: > > (*) a patch to allow all front ends to register a lang spec function. >(included are patches

[Ada] Fix segfault on dynamic array bound

2019-06-29 Thread Eric Botcazou
This is a regression present on mainline, 9 and 8 branches: the compiler segfaults when trying to elaborate the upper bound of an array whose value is obtained through the deference of an access object present in an instance. Tested on x86-64/Linux, applied on mainline, 9 and 8 branches. 2019-

[Ada] Fix GIMPLE checking failure on broken code

2019-06-29 Thread Eric Botcazou
Because of questionable unchecked conversions. Tested on x86-64/Linux, applied on mainline. 2019-06-29 Eric Botcazou * gcc-interface/utils.c (unchecked_convert): Tweak comment. Only skip dereferences when padding to have the same size on both sides. Do it for destin

[Ada] Fix inconsistent Value_Size for Strict_Alignment types

2019-06-29 Thread Eric Botcazou
In Ada we have what we call strict-alignment types, i.e. types that can never be misaligned in record types. They are exactly the types which contain an aliased field, either explicitly or implicitly (i.e. tagged types). For them, by definition of 'Size in the Ada RM, this 'Size must be equal t

[Ada] Improved error message for misaligned fields

2019-06-29 Thread Eric Botcazou
The error message now mentions the alignment of the field's type and gives the position in storage units (bytes in Ada parlance) for the sake of consistency. Tested on x86-64/Linux, applied on mainline. 2019-06-29 Eric Botcazou * gcc-interface/decl.c (gnat_to_gnu_field): Rework erro

[Ada] Properly set TYPE_SIZES_GIMPLIFIED

2019-06-29 Thread Eric Botcazou
Another example in the series "how can this have worked for so long?"... Tested on x86-64/Linux, applied on all active branches. 2019-06-29 Eric Botcazou * gcc-interface/trans.c (mark_visited_r): Set TYPE_SIZES_GIMPLIFIED on the main variant of a type, if any. -- Eric Botca

[Ada] Add missing guard for TYPE_CANONICAL

2019-06-29 Thread Eric Botcazou
Otherwise this can crash on types with so-called structural equality. Tested on x86-64/Linux, applied on all active branches. 2019-06-29 Eric Botcazou * gcc-interface/decl.c (set_nonaliased_component_on_array_type): Add missing guard for the presence of TYPE_CANONICAL.

[Ada] Fix wrong code with small array in packed record

2019-06-29 Thread Eric Botcazou
This fixes a long-standing issue with small arrays that end up being not aligned on byte boundaries in packed record types but whose size still is a multiple of a byte. This case reveals a small loophole between the front-end and the middle-end that gigi needs to plug. There is also a trivial