[PATCH][pushed] changelog: fix parsing of a revert commits

2020-11-24 Thread Martin Liška
We've got a commit that we parse in a wrong way: commit ce2d9549f2b2bcb70a1a6f8f4e776e1ed427546b Author: Ulrich Weigand Date: Tue Nov 24 19:30:01 2020 +0100 Revert: "Fix -ffast-math flags handling inconsistencies" This reverts commit c4fa3728ab4f78984a549894e0e8c4d6a253e540,

[PATCH] rs6000: Set param_vect_partial_vector_usage as 1 for P10

2020-11-24 Thread Kewen.Lin via Gcc-patches
Hi, This patch is to set param_vect_partial_vector_usage as 1 on P10 by default. Due to the unexpected performance on Power9 of those vector with length instructions, we didn't enable vectorization with partial vectors before. Some recent testings show that they perform expectedly on Power10

Re: [PATCH] Overflow-trapping integer arithmetic routines7code

2020-11-24 Thread Jeff Law via Gcc-patches
On 11/10/20 10:21 AM, Stefan Kanthak wrote: >> So with all that in mind, I installed everything except the bits which >> have the LIBGCC2_BAD_CODE ifdefs after testing on the various crosses. >> If you could remove the ifdefs on the abs/mult changes and resubmit them >> it'd be appreciated. >

Re: [PATCH v2] rs6000, vector integer multiply/divide/modulo instructions

2020-11-24 Thread Pat Haugen via Gcc-patches
On 11/24/20 8:17 PM, Pat Haugen via Gcc-patches wrote: > On 11/24/20 12:59 PM, Carl Love via Gcc-patches wrote: >> + >> +(define_insn "dives_" >> + [(set (match_operand:VIlong 0 "vsx_register_operand" "=v") >> +(unspec:VIlong [(match_operand:VIlong 1 "vsx_register_operand" "v") >> +

Re: [PATCH v2] rs6000, vector integer multiply/divide/modulo instructions

2020-11-24 Thread Pat Haugen via Gcc-patches
On 11/24/20 12:59 PM, Carl Love via Gcc-patches wrote: > + > +(define_insn "dives_" > + [(set (match_operand:VIlong 0 "vsx_register_operand" "=v") > +(unspec:VIlong [(match_operand:VIlong 1 "vsx_register_operand" "v") > + (match_operand:VIlong 2 "vsx_register_operand"

[PATCH] clean up more -Wformat-diag (PR 94982)

2020-11-24 Thread Martin Sebor via Gcc-patches
The attached patch cleans up most remaining -Wformat-diag instances in an x86_64-build. I tried to minimize using #pragma diagnostic so I tweaked the code instead. A preferable solution might be to introduce a new format attribute and used it to exempt the pp_printf() and verbatim() functions

Re: [PATCH] libstdc++: Add C++2a synchronization support

2020-11-24 Thread Jonathan Wakely via Gcc-patches
On 24/11/20 23:45 +, Jonathan Wakely wrote: On 21/11/20 16:36 -0800, H.J. Lu wrote: On Sat, Nov 21, 2020 at 9:40 AM Jonathan Wakely via Gcc-patches wrote: On 21/11/20 17:04 +, Jonathan Wakely wrote: On 21/11/20 16:16 +0100, Andreas Schwab wrote: In file included from

[PATCH] make POINTER_PLUS offset sizetype (PR 97956)

2020-11-24 Thread Martin Sebor via Gcc-patches
Offsets in pointer expressions are signed but GCC prefers to represent them as sizetype instead, and sometimes (though not always) crashes during GIMPLE verification when they're not. The sometimes-but-not-always part makes it easy for mistakes to slip in and go undetected for months, until

Re: [PATCH] c++: v2: Add __builtin_bit_cast to implement std::bit_cast [PR93121]

2020-11-24 Thread Jeff Law via Gcc-patches
On 11/2/20 12:21 PM, Jakub Jelinek via Gcc-patches wrote: > On Thu, Jul 30, 2020 at 10:16:46AM -0400, Jason Merrill via Gcc-patches wrote: >>> The following patch adds __builtin_bit_cast builtin, similarly to >>> clang or MSVC which implement std::bit_cast using such an builtin too. >> Great! >

Re: [PATCH 1/3] PowerPC: Add long double target-supports.

2020-11-24 Thread Segher Boessenkool
On Tue, Nov 24, 2020 at 04:44:19PM -0500, Michael Meissner wrote: > On Mon, Nov 23, 2020 at 02:28:57PM -0600, Segher Boessenkool wrote: > > On Sat, Nov 21, 2020 at 12:33:52AM -0500, Michael Meissner wrote: > > > +# See if the target is a powerpc with the long double format that uses > > > the IBM

Re: [PATCH] libstdc++: Add C++2a synchronization support

2020-11-24 Thread Jonathan Wakely via Gcc-patches
On 21/11/20 16:36 -0800, H.J. Lu wrote: On Sat, Nov 21, 2020 at 9:40 AM Jonathan Wakely via Gcc-patches wrote: On 21/11/20 17:04 +, Jonathan Wakely wrote: >On 21/11/20 16:16 +0100, Andreas Schwab wrote: >>In file included from

Re: [PATCH v2] Fix -ffast-math flags handling inconsistencies

2020-11-24 Thread Segher Boessenkool
Hi Ulrich, On Tue, Nov 24, 2020 at 07:42:47PM +0100, Ulrich Weigand wrote: > This did handle flag_excess_precision incorrectly, causing in particular > https://gcc.gnu.org/bugzilla/show_bug.cgi?id=97970 > > I've reverted for now and will post a modified patch later. > Sorry for the breakage! >

Re: [PATCH] c++: Don't form a templated TARGET_EXPR in finish_compound_literal

2020-11-24 Thread Jason Merrill via Gcc-patches
On 11/16/20 5:45 PM, Patrick Palka wrote: On Mon, 16 Nov 2020, Jason Merrill wrote: On 11/13/20 10:43 AM, Patrick Palka wrote: On Thu, 12 Nov 2020, Jason Merrill wrote: On 11/12/20 1:27 PM, Patrick Palka wrote: The atom_cache in normalize_atom relies on the assumption that two equivalent

Re: [PATCH 2/4] rs6000: Support variable insert and Expand vec_insert in expander [PR79251]

2020-11-24 Thread Segher Boessenkool
Hi! On Sat, Oct 10, 2020 at 03:08:23AM -0500, Xionghu Luo wrote: > vec_insert accepts 3 arguments, arg0 is input vector, arg1 is the value > to be insert, arg2 is the place to insert arg1 to arg0. Current expander > generates stxv+stwx+lxv if arg2 is variable instead of constant, which > causes

[committed] avoid more invalid redeclarations (PR 97955)

2020-11-24 Thread Martin Sebor via Gcc-patches
The attached trivial patch, committed in r11-5325, avoids failing with an ICE when attempting to check the arguments of an invalid function redeclaration. Martin PR c/97955 - ICE in build_array_type_1 on invalid redeclaration of function with VLA parameter gcc/c-family/ChangeLog: * c-warn.c

Re: [PATCH] c++: Implement -Wuninitialized for mem-initializers [PR19808]

2020-11-24 Thread Jason Merrill via Gcc-patches
On 11/20/20 6:08 PM, Martin Sebor wrote: On 11/19/20 11:41 AM, Jason Merrill wrote: On 11/17/20 3:44 AM, Jan Hubicka wrote: On Tue, Nov 17, 2020 at 01:33:48AM -0500, Jason Merrill via Gcc-patches wrote: Why doesn't the middle-end warning work for inline functions? It does but only when

Re: [PATCH] Avoid atomic for guard acquire when that is expensive

2020-11-24 Thread Jason Merrill via Gcc-patches
On 11/22/20 3:05 AM, Bernd Edlinger wrote: Hi, this avoids the need to use -fno-threadsafe-statics on arm-none-eabi or working around that problem by supplying a dummy __sync_synchronize function which might just lead to silent code failure of the worst kind (non-reproducable, racy) at runtime,

Re: [PATCH 1/3] PowerPC: Add long double target-supports.

2020-11-24 Thread Michael Meissner via Gcc-patches
On Mon, Nov 23, 2020 at 02:28:57PM -0600, Segher Boessenkool wrote: > Hi! > > On Sat, Nov 21, 2020 at 12:33:52AM -0500, Michael Meissner wrote: > > +# See if the target is a powerpc with the long double format that uses the > > IBM > > +# extended double format. > > "Return 1 if the target is

Re: OpenACC 'kernels' testsuite failures

2020-11-24 Thread David Edelsohn via Gcc-patches
On Tue, Nov 24, 2020 at 5:19 AM Thomas Schwinge wrote: > > Hi! > > On 2020-11-21T10:50:10-0500, David Edelsohn wrote: > > I see > > > > "during GIMPLE pass: omplower" > > > > message for kernels-decompose-ice-2.c. kernels-decompose-ice-1.c > > explicitly prunes that output, but

Re: [PATCH] use TYPE_SIZE instead of DECL_SIZE for classes (PR 97595)

2020-11-24 Thread Jason Merrill via Gcc-patches
On 11/23/20 7:06 PM, Martin Sebor wrote: On 11/16/20 11:54 PM, Jason Merrill wrote: On 11/16/20 9:41 PM, Martin Sebor wrote: The result of DECL_SIZE_UNIT doesn't always reflect the size of data members of virtual classes.  This can lead to objects of such types appearing smaller than they are

[pushed] c++: ICE with int{} in template. [PR97899]

2020-11-24 Thread Jason Merrill via Gcc-patches
split_nonconstant_init_1 was confused by a CONSTRUCTOR with non-aggregate type, which (with COMPOUND_LITERAL_P set) we use in a template to represent a braced functional cast. It seems to me that there's no good reason to do split_nonconstant_init at all in a template. Tested

Re: [PATCH 1/4] rs6000: Change rs6000_expand_vector_set param

2020-11-24 Thread Segher Boessenkool
On Sat, Oct 10, 2020 at 03:08:22AM -0500, Xionghu Luo wrote: > rs6000_expand_vector_set could accept insert either to constant position > or variable position, so change the operand to reg_or_cint_operand. This is okay for trunk. Thank you! Segher > 2020-10-10 Xionghu Luo > > *

[PATCH v2] rs6000, vector integer multiply/divide/modulo instructions

2020-11-24 Thread Carl Love via Gcc-patches
Segher: I have addressed the various issues you and Pat mentioned. Specifically: - Added parenthesis around the macro arguments in altivec.h. - Removed VIlong_char, using instead. - Reimplemented define_insn "vmulhs_" and define_insn "vmulhs_" to not use an UNSPEC. Also changed the

Re: [PATCH v2] Fix -ffast-math flags handling inconsistencies

2020-11-24 Thread Ulrich Weigand via Gcc-patches
On Fri, Nov 20, 2020 at 09:33:48PM -0700, Jeff Law wrote: > > * doc/invoke.texi (-ffast-math): Remove mention of -fno-signaling-nans. > > Clarify conditions when __FAST_MATH__ preprocessor macro is defined. > > > > * opts.c (common_handle_option): Pass OPTS_SET to set_fast_math_flags >

Re: [PATCH] warn for integer overflow in allocation calls (PR 96838)

2020-11-24 Thread Martin Sebor via Gcc-patches
On 11/24/20 10:44 AM, Andrew MacLeod wrote: On 11/24/20 12:42 PM, Andrew MacLeod wrote: On 11/23/20 4:38 PM, Martin Sebor wrote: On 11/21/20 6:26 AM, Andrew MacLeod wrote: On 11/21/20 12:07 AM, Jeff Law wrote: On 11/9/20 9:00 AM, Martin Sebor wrote: Ping:

Re: [PATCH] warn for integer overflow in allocation calls (PR 96838)

2020-11-24 Thread Andrew MacLeod via Gcc-patches
On 11/24/20 12:42 PM, Andrew MacLeod wrote: On 11/23/20 4:38 PM, Martin Sebor wrote: On 11/21/20 6:26 AM, Andrew MacLeod wrote: On 11/21/20 12:07 AM, Jeff Law wrote: On 11/9/20 9:00 AM, Martin Sebor wrote: Ping: https://gcc.gnu.org/pipermail/gcc-patches/2020-September/554000.html Jeff, I

Re: [PATCH] warn for integer overflow in allocation calls (PR 96838)

2020-11-24 Thread Andrew MacLeod via Gcc-patches
On 11/23/20 4:38 PM, Martin Sebor wrote: On 11/21/20 6:26 AM, Andrew MacLeod wrote: On 11/21/20 12:07 AM, Jeff Law wrote: On 11/9/20 9:00 AM, Martin Sebor wrote: Ping: https://gcc.gnu.org/pipermail/gcc-patches/2020-September/554000.html Jeff, I don't expect to have the cycles to reimplement

Re: [wwwdocs] Re: [PATCH v2] Fix -ffast-math flags handling inconsistencies

2020-11-24 Thread Segher Boessenkool
Hi! On Tue, Nov 24, 2020 at 11:55:23AM +0100, Ulrich Weigand wrote: > On Sat, Nov 21, 2020 at 01:57:32PM -0600, Segher Boessenkool wrote: > > It all makes sense, and is a nice improvement :-) But please mention it > > in the release notes? No doubt people did use non-sensical flag > >

Re: [PATCH] dump type attributes in dump_function_to_file

2020-11-24 Thread Martin Sebor via Gcc-patches
On 11/24/20 8:53 AM, Martin Sebor wrote: On 11/23/20 9:31 PM, Jeff Law wrote: On 11/20/20 4:14 PM, Jeff Law wrote: On 11/20/20 11:12 AM, Martin Sebor via Gcc-patches wrote: dump_function_to_file prints DECL_ATTRIBUTES but not TYPE_ATTRIBUTES when both can be important and helpful for

Re: How to traverse all the local variables that declared in the current routine?

2020-11-24 Thread Qing Zhao via Gcc-patches
> On Nov 24, 2020, at 9:55 AM, Richard Biener > wrote: > > On Tue, Nov 24, 2020 at 4:47 PM Qing Zhao wrote: >> >> >> >>> On Nov 24, 2020, at 1:32 AM, Richard Biener >>> wrote: >>> >>> On Tue, Nov 24, 2020 at 12:05 AM Qing Zhao via Gcc-patches >>> wrote: Hi, Does

Re: Update: [PATCH 5/X] libsanitizer: mid-end: Introduce stack variable handling for HWASAN

2020-11-24 Thread Matthew Malcomson via Gcc-patches
On 24/11/2020 12:30, Hongtao Liu wrote: Hi: I'm learning about this patch, and I see one place that might be slighted improved. + poly_int64 size = (top - bot); + + /* Assert the edge of each variable is aligned to the HWASAN tag granule +size. */ + gcc_assert

[PATCH] arm: correctly handle negating INT_MIN in arm_split_atomic_op [PR97534]

2020-11-24 Thread Richard Earnshaw (lists) via Gcc-patches
arm_split_atomic_op handles subtracting a constant by converting it into addition of the negated constant. But if the type of the operand is int and the constant is -1 we currently end up generating invalid RTL which can lead to an abort later on. The problem is that in a HOST_WIDE_INT, INT_MIN

[COMMITTED] patch to fix PR97933

2020-11-24 Thread Vladimir Makarov via Gcc-patches
The following patch fixes   https://gcc.gnu.org/bugzilla/show_bug.cgi?id=97933 The patch was successfully bootstrapped on x86-64 and s390x. commit fb352136db34a7adbc7be6a1e4e90b56bc632ebd (HEAD -> master) Author: Vladimir N. Makarov Date: Tue Nov 24 11:25:16 2020 -0500 [PR97933] LRA:

preprocessor: Add deferred macros

2020-11-24 Thread Nathan Sidwell
this completes the libcpp changes for C++ modules. It is slightly different to the patch I posted earlier, as I discovered I'd added a bitfield I didn't end up using. so that's now removed. Deferred macros are needed for C++ modules. Header units may export macro definitions and

[PATCH] testsuite/libstdc++: Fix required locales of a testcase

2020-11-24 Thread Marius Hillenbrand via Gcc-patches
The testsuite for libstdc++ aims to skips test cases for which not all required locales are installed. This patch adds missing directives about required locales to one test case to avoid false positive test failures on systems that have a partial set of locales installed. Verified by test suite

RE: libsanitizer: Hwasan reporting check for dladdr failing

2020-11-24 Thread Kyrylo Tkachov via Gcc-patches
> -Original Message- > From: Matthew Malcomson > Sent: 24 November 2020 16:20 > To: Kyrylo Tkachov > Cc: Richard Sandiford ; gcc- > patc...@gcc.gnu.org > Subject: Re: libsanitizer: Hwasan reporting check for dladdr failing > > On 24/11/2020 15:53, Kyrylo Tkachov wrote: > > Hi Matthew,

Re: libsanitizer: Hwasan reporting check for dladdr failing

2020-11-24 Thread Matthew Malcomson via Gcc-patches
On 24/11/2020 15:53, Kyrylo Tkachov wrote: Hi Matthew, -Original Message- From: Gcc-patches On Behalf Of Matthew Malcomson via Gcc-patches Sent: 24 November 2020 15:47 To: gcc-patches@gcc.gnu.org Cc: Richard Sandiford Subject: libsanitizer: Hwasan reporting check for dladdr failing

Re: How to traverse all the local variables that declared in the current routine?

2020-11-24 Thread Richard Biener via Gcc-patches
On Tue, Nov 24, 2020 at 4:47 PM Qing Zhao wrote: > > > > > On Nov 24, 2020, at 1:32 AM, Richard Biener > > wrote: > > > > On Tue, Nov 24, 2020 at 12:05 AM Qing Zhao via Gcc-patches > > wrote: > >> > >> Hi, > >> > >> Does gcc provide an iterator to traverse all the local variables that are >

Re: [PATCH] dump type attributes in dump_function_to_file

2020-11-24 Thread Martin Sebor via Gcc-patches
On 11/23/20 9:31 PM, Jeff Law wrote: On 11/20/20 4:14 PM, Jeff Law wrote: On 11/20/20 11:12 AM, Martin Sebor via Gcc-patches wrote: dump_function_to_file prints DECL_ATTRIBUTES but not TYPE_ATTRIBUTES when both can be important and helpful for debugging, especially with attributes that are

RE: libsanitizer: Hwasan reporting check for dladdr failing

2020-11-24 Thread Kyrylo Tkachov via Gcc-patches
Hi Matthew, > -Original Message- > From: Gcc-patches On Behalf Of > Matthew Malcomson via Gcc-patches > Sent: 24 November 2020 15:47 > To: gcc-patches@gcc.gnu.org > Cc: Richard Sandiford > Subject: libsanitizer: Hwasan reporting check for dladdr failing > > Hello there, > > This is

Re: Free more of CFG in release_function_body

2020-11-24 Thread Richard Biener
On Tue, 24 Nov 2020, Jan Hubicka wrote: > Hi, > at the end of processing function body we loop over basic blocks and > free all edges while we do not free the rest. I think this is leftover > from time eges was not garbage collected and we was not using ggc_free. > It makes more sense to free

Re: [PATCH] Better __ashlDI3, __ashrDI3 and __lshrDI3 functions, plus fixed __bswapsi2 function

2020-11-24 Thread Andreas Schwab
On Nov 24 2020, Stefan Kanthak wrote: > Pinpoint deficiencies and bugs in GCC and libgcc, plus a counter > example to your "argument"! In which way? > I recommend careful reading. Yes, I do. Andreas. -- Andreas Schwab, sch...@linux-m68k.org GPG Key fingerprint = 7578 EB47 D4E5 4D69 2510

Re: [PATCH] Better __ashlDI3, __ashrDI3 and __lshrDI3 functions, plus fixed __bswapsi2 function

2020-11-24 Thread Stefan Kanthak
Andreas Schwab wrote: > On Nov 24 2020, Stefan Kanthak wrote: > >> 'nuff said > > What's your point? Pinpoint deficiencies and bugs in GCC and libgcc, plus a counter example to your "argument"! I recommend careful reading. Stefan

Re: How to traverse all the local variables that declared in the current routine?

2020-11-24 Thread Qing Zhao via Gcc-patches
> On Nov 24, 2020, at 1:32 AM, Richard Biener > wrote: > > On Tue, Nov 24, 2020 at 12:05 AM Qing Zhao via Gcc-patches > wrote: >> >> Hi, >> >> Does gcc provide an iterator to traverse all the local variables that are >> declared in the current routine? >> >> If not, what’s the best way

libsanitizer: Hwasan reporting check for dladdr failing

2020-11-24 Thread Matthew Malcomson via Gcc-patches
Hello there, This is the compiler-rt patch I'd like to cherry-pick so that the hwasan tests pass. It is in LLVM as commit 83ac18205ec69a00ac2be3b603bc3a61293fbe89. Ok for trunk? Also is the libhwasan library merge from the below email OK for trunk?

Re: H8 cc0 conversion

2020-11-24 Thread Jeff Law via Gcc-patches
On 11/24/20 4:08 AM, Eric Botcazou wrote: >> I'm intested in any notes, however vague, on that matter. I was >> a bit surprised to see that myself...that is, after fixing >> *some* related regressions, like the one in combine. (Did I >> actually miss something?) > My recollection for the

Free more of CFG in release_function_body

2020-11-24 Thread Jan Hubicka
Hi, at the end of processing function body we loop over basic blocks and free all edges while we do not free the rest. I think this is leftover from time eges was not garbage collected and we was not using ggc_free. It makes more sense to free all associated structures (which is importnat for WPA

Re: [PATCH] libstdc++: Ensure __gthread_self doesn't call undefined weak symbol [PR 95989]

2020-11-24 Thread Jonathan Wakely via Gcc-patches
On 19/11/20 21:42 +, Jonathan Wakely wrote: On 12/11/20 17:34 +, Jonathan Wakely wrote: On 11/11/20 19:08 +0100, Jakub Jelinek via Libstdc++ wrote: On Wed, Nov 11, 2020 at 05:24:42PM +, Jonathan Wakely wrote: --- a/libgcc/gthr-posix.h +++ b/libgcc/gthr-posix.h @@ -684,7 +684,14 @@

[committed] aarch64: Fix aapcs64 testsuite failures

2020-11-24 Thread Richard Sandiford via Gcc-patches
Various aapcs64 tests were failing at -O1 and above because the assignments to testfunc_ptr were being deleted as dead. That in turn happened because FUNC_VAL_CHECK hid the tail call to myfunc using an LR asm trick: asm volatile ("mov %0, x30" : "=r" (saved_return_address)); asm volatile

[committed] amdgcn: Tweak plugin-gcn defines

2020-11-24 Thread Andrew Stubbs
This tiny patch just cleans up some defines in the libgomp GCN plugin. The code wouldn't compile, as it was, if elf.h is updated to support GCN relocations. This should fix that. The other user, mkoffload.c, was already fixed. Andrew Tweak plugin-gcn.c defines Ensure the code will continue

[committed] libstdc++: Throw instead of segfaulting in std::thread constructor [PR 67791]

2020-11-24 Thread Jonathan Wakely via Gcc-patches
This turns a mysterious segfault into an exception with a more useful message. If the exception isn't caught, the user sees this instead of just a segfault: terminate called after throwing an instance of 'std::system_error' what(): Enable multithreading to use std::thread: Operation not

[committed] libstdc++: Use __libc_single_threaded for locale initialization

2020-11-24 Thread Jonathan Wakely via Gcc-patches
Most initialization of locales and facets happens before main() during startup, when the program is likely to only have one thread. By using the new __gnu_cxx::__is_single_threaded() function instead of checking __gthread_active_p() we can avoid using pthread_once or atomics for the common case.

Re: [PATCH] Better __ashlDI3, __ashrDI3 and __lshrDI3 functions, plus fixed __bswapsi2 function

2020-11-24 Thread Andreas Schwab
On Nov 24 2020, Stefan Kanthak wrote: > 'nuff said What's your point? Andreas. -- Andreas Schwab, sch...@linux-m68k.org GPG Key fingerprint = 7578 EB47 D4E5 4D69 2510 2552 DF73 E780 A9DA AEC1 "And now for something completely different."

Re: [PATCH] Better __ashlDI3, __ashrDI3 and __lshrDI3 functions, plus fixed __bswapsi2 function

2020-11-24 Thread Stefan Kanthak
Andreas Schwab wrote 2020-11-11: > On Nov 10 2020, Stefan Kanthak wrote: > >> Eric Botcazou wrote: >> The implementation of the __ashlDI3(), __ashrDI3() and __lshrDI3() functions is rather bad, it yields bad machine code at least on i386 and AMD64. Since GCC knows how to

Re: [PATCH][PR target/97642] Fix incorrect replacement of vmovdqu32 with vpblendd.

2020-11-24 Thread Jakub Jelinek via Gcc-patches
On Tue, Nov 24, 2020 at 10:36:49AM +0800, Hongtao Liu via Gcc-patches wrote: > > > * gcc.target/i386/pr97642-2.c: New test. > > So in the BZ Jakub asked for the all-ones mask case to be specially > > handled to emit a normal load. I don't see where we're handling that. > > ISTM that we'd

Re: [PATCH] middle-end: Support complex Addition

2020-11-24 Thread Hongtao Liu via Gcc-patches
On Mon, Nov 23, 2020 at 11:54 PM Richard Biener wrote: > > On Mon, 23 Nov 2020, Tamar Christina wrote: > > > Hi All, > > > > This patch adds support for > > > > * Complex Addition with rotation of 90 and 270. > > > > Addition with rotation of the second argument around the Argand plane. > >

Re: [PATCH] IBM Z: Restrict vec_cmp on z13

2020-11-24 Thread Andreas Krebbel via Gcc-patches
On 24.11.20 12:55, Ilya Leoshkevich wrote: > Bootstrapped and regtested on s390x-redhat-linux. Ok for master? > > > > Commit 5d9ade39b872 ("IBM Z: Fix PR97326: Enable fp compares in > vec_cmp") made it possible to create rtxes that describe signaling > comparisons on z13, which are not

Re: Update: [PATCH 5/X] libsanitizer: mid-end: Introduce stack variable handling for HWASAN

2020-11-24 Thread Hongtao Liu via Gcc-patches
Hi: I'm learning about this patch, and I see one place that might be slighted improved. + poly_int64 size = (top - bot); + + /* Assert the edge of each variable is aligned to the HWASAN tag granule +size. */ + gcc_assert (multiple_p (top, HWASAN_TAG_GRANULE_SIZE)); +

[PATCH] IBM Z: Restrict vec_cmp on z13

2020-11-24 Thread Ilya Leoshkevich via Gcc-patches
Bootstrapped and regtested on s390x-redhat-linux. Ok for master? Commit 5d9ade39b872 ("IBM Z: Fix PR97326: Enable fp compares in vec_cmp") made it possible to create rtxes that describe signaling comparisons on z13, which are not supported by the hardware. Restrict this by using

Re: H8 cc0 conversion

2020-11-24 Thread Eric Botcazou
> I'm intested in any notes, however vague, on that matter. I was > a bit surprised to see that myself...that is, after fixing > *some* related regressions, like the one in combine. (Did I > actually miss something?) My recollection for the Visium port would align with what Jeff saw but, on the

Re: [PATCH v2 01/31] PR target/58901: reload: Handle SUBREG of MEM with a mode-dependent address

2020-11-24 Thread Eric Botcazou
> First posted at: . > > 2020-11-24 Matt Thomas > Maciej W. Rozycki > > gcc/ > PR target/58901 > * reload.c (push_reload): Also reload the inner expression of a > SUBREG for pseudos associated with a

Re: [PATCH] middle-end: Reject flexible array members in __builtin_clear_padding [PR97943]

2020-11-24 Thread Jakub Jelinek via Gcc-patches
On Tue, Nov 24, 2020 at 10:56:46AM +, Richard Biener wrote: > On Tue, 24 Nov 2020, Jakub Jelinek wrote: > > As mentioned in the PR, we currently ICE on flexible array members in > > structs and unions during __builtin_clear_padding processing. > > > > Jason said in the PR he'd prefer an error

Re: [PATCH] middle-end: Reject flexible array members in __builtin_clear_padding [PR97943]

2020-11-24 Thread Richard Biener
On Tue, 24 Nov 2020, Jakub Jelinek wrote: > Hi! > > As mentioned in the PR, we currently ICE on flexible array members in > structs and unions during __builtin_clear_padding processing. > > Jason said in the PR he'd prefer an error in these cases over forcefully > handling it as [0] arrays

[wwwdocs] Re: [PATCH v2] Fix -ffast-math flags handling inconsistencies

2020-11-24 Thread Ulrich Weigand via Gcc-patches
On Sat, Nov 21, 2020 at 01:57:32PM -0600, Segher Boessenkool wrote: > On Fri, Nov 20, 2020 at 09:33:48PM -0700, Jeff Law wrote: > > On 2/11/20 11:43 AM, Ulrich Weigand wrote: > > > 1. If a component flag of -ffast-math (or -funsafe-math-optimizations) > > >is explicitly set (or reset) on the

RE: [PATCH] middle-end: Support complex Addition

2020-11-24 Thread Richard Biener
On Tue, 24 Nov 2020, Richard Biener wrote: > On Mon, 23 Nov 2020, Tamar Christina wrote: > > > Hi Richi, > > > > > -Original Message- > > > From: Richard Biener > > > Sent: Monday, November 23, 2020 3:51 PM > > > To: Tamar Christina > > > Cc: gcc-patches@gcc.gnu.org; nd ; o...@ucw.cz;

Re: Fix hanlding of gimple_clobber in ICF

2020-11-24 Thread Jan Hubicka
> Hi Honza! > > On 2020-11-19T13:33:53+0100, Jan Hubicka wrote: > > --- a/gcc/ipa-icf-gimple.c > > +++ b/gcc/ipa-icf-gimple.c > > @@ -245,6 +245,14 @@ func_checker::hash_operand (const_tree arg, > > inchash::hash , > >break; > > } > > > > + /* In gimple all clobbers can be

Re: [PATCH 1,2] Darwin : Update libtool and dependencies for Darwin20 [PR97865]

2020-11-24 Thread Jonathan Wakely via Gcc-patches
On 23/11/20 20:01 +, Iain Sandoe wrote: Hi This fixes a blocker for x86_64 darwin20 (a.k.a macOS 11) It is needed on all open branches too. (probably this comes under my Dariwn hat - but since it involves regenerating all the configure scripts… I’d welcome another pair of eyes) tested on:

Re: Fix hanlding of gimple_clobber in ICF

2020-11-24 Thread Thomas Schwinge
Hi Honza! On 2020-11-19T13:33:53+0100, Jan Hubicka wrote: > --- a/gcc/ipa-icf-gimple.c > +++ b/gcc/ipa-icf-gimple.c > @@ -245,6 +245,14 @@ func_checker::hash_operand (const_tree arg, > inchash::hash , >break; > } > > + /* In gimple all clobbers can be considered equal: while

Re: [OpenACC 7/11] execution model

2020-11-24 Thread Thomas Schwinge
Hi! On 2015-10-21T15:42:26-0400, Nathan Sidwell wrote: > This patch is the early lowering part of OpenACC loops. Rather than > piggy-back > onto expand_omp_for_static_nochunk & expand_omp_for_static_chunk, we have a > new > function 'expand_oacc_for', which does the OpenACC equivalent >

[PATCH] middle-end: Reject flexible array members in __builtin_clear_padding [PR97943]

2020-11-24 Thread Jakub Jelinek via Gcc-patches
Hi! As mentioned in the PR, we currently ICE on flexible array members in structs and unions during __builtin_clear_padding processing. Jason said in the PR he'd prefer an error in these cases over forcefully handling it as [0] arrays (everything is padding then) or consider the arrays to have

Re: OpenACC 'kernels' testsuite failures

2020-11-24 Thread Thomas Schwinge
Hi! On 2020-11-21T10:50:10-0500, David Edelsohn wrote: > I see > > "during GIMPLE pass: omplower" > > message for kernels-decompose-ice-2.c. kernels-decompose-ice-1.c > explicitly prunes that output, but kernels-decompose-ice-2.c does not. > Is there a reason that the second testcase does not

[Ada] Cannot process -S -o with GNAT LLVM

2020-11-24 Thread Pierre-Marie de Rodat
This is fixed by recognizing -S in Scan_Compiler_Args and taking it into account in Set_Output_Object_File_Name. Tested on x86_64-pc-linux-gnu, committed on trunk gcc/ada/ * opt.ads (Generate_Asm): New flag. * osint-c.adb (Set_Output_Object_File_Name): Accept any

[Ada] Replace chained if-then-elsif with case stmt for attribute ids

2020-11-24 Thread Pierre-Marie de Rodat
Handle attribute ids in SPARK-specific expansion with a case statement, just like they are handled in ordinary expansion. Code cleanup only, in preparation for fix related to attribute Constrained; semantics is unaffected. Tested on x86_64-pc-linux-gnu, committed on trunk gcc/ada/ *

[Ada] Fix inconsistent parameter of SPARK_Msg_NE

2020-11-24 Thread Pierre-Marie de Rodat
All calls to SPARK_Msg_NE except one were taking an entity as its second parameter; this patch does the same for one call that took an identifier. Code cleanup only; behaviour is unaffected, because both entity and identifier works in the same when given to SPARK_Msg_NE routine. Tested on

[Ada] Compiler crash on assertion pragma in ghost region

2020-11-24 Thread Pierre-Marie de Rodat
This patch fixes an error in the compiler whereby an assertion pragma within a ghost context whose expression causes the freezing of a non-ghost type causes the compiler to crash during compilation when ghost mode is disabled. Tested on x86_64-pc-linux-gnu, committed on trunk gcc/ada/ *

[Ada] Recognize delta and extension aggregates as objects

2020-11-24 Thread Pierre-Marie de Rodat
Ada RM 3.3 says that "aggregate" is an object, but GNAT represents "aggregate" either as N_Aggregate, N_Delta_Aggregate or N_Extension_Aggregate. With this patch both extension and delta aggregates are accepted where object is required, e.g. as a prefix of attribute Size. Tested on

[Ada] Small cleanup in the Ada.Text_IO hierarchy

2020-11-24 Thread Pierre-Marie de Rodat
This removes an implementation subtype declared in the Ada.Text_IO hierarchy that no longer seems to serve any useful purpose. No functional changes. Tested on x86_64-pc-linux-gnu, committed on trunk gcc/ada/ * libgnat/a-wtdeio.adb (TFT): Delete and adjust throughout. *

[Ada] AI12-0394 Named Numbers and User-Defined Numeric Literals

2020-11-24 Thread Pierre-Marie de Rodat
Integer named numbers may now be used with types that have an Integer_Literal aspect. Real named numbers may be used with types that have a Real_Literal aspect with an overloading that takes two strings. Tested on x86_64-pc-linux-gnu, committed on trunk gcc/ada/ * sem_ch13.adb

[Ada] Implement No_Unrecognized_{Aspects,Pragmas} restrictions

2020-11-24 Thread Pierre-Marie de Rodat
This commit implements the No_Unrecognized_Aspects and No_Unrecognized_Pragmas restrictions described in AI12-0389. Tested on x86_64-pc-linux-gnu, committed on trunk gcc/ada/ * libgnat/s-rident.ads (System.Rident): Register new restriction IDs. * par-ch13.adb

[Ada] Accept local objects in the prefix of attribute Loop_Entry

2020-11-24 Thread Pierre-Marie de Rodat
Fix implementation of SPARK RM 5.5.3.1(5) by accepting objects declared within the prefix of attribute Loop_Variant itself. This previous code didn't implement the "... but not within the prefix itself" part of the rule. Tested on x86_64-pc-linux-gnu, committed on trunk gcc/ada/ *

[Ada] Fix crash in GNATprove on inlined subprogram in default expression

2020-11-24 Thread Pierre-Marie de Rodat
The special inlining in GNATprove mode should recognize specially calls inside default expressions, which cannot be inlined. This was not done for calls in default expressions for discriminants, because the right analysis context was not set in that case. Now fixed. Tested on x86_64-pc-linux-gnu,

[Ada] Handle correctly current instance of PO in local subprogram Global

2020-11-24 Thread Pierre-Marie de Rodat
SPARK defines the current instance of a protected object as non-volatile for internal calls, which allows to use it in the Global contract of a local non-volatile function. This was not handled correctly, now fixed. Tested on x86_64-pc-linux-gnu, committed on trunk gcc/ada/ *

[Ada] Fix internal error on multiple nested instantiations

2020-11-24 Thread Pierre-Marie de Rodat
This prevents the compiler from placing the freeze node of a package instance, used as actual parameter in a second instantiation, after this second instance, thus triggering an internal error later. The freezing code in Analyze_Associations already knows how to deal with this case, but the

[Ada] Fix String_Literal aspect spec checking problem for scalars.

2020-11-24 Thread Pierre-Marie de Rodat
Result type compatibility checking for the specified String_Literal function of a type was too strict, causing valid aspect specifications to be incorrectly rejected. Tested on x86_64-pc-linux-gnu, committed on trunk gcc/ada/ * sem_ch13.adb (Validate_Literal_Aspect): Call to Base_Type

[Ada] Wrong resolution of universal_access = operators

2020-11-24 Thread Pierre-Marie de Rodat
The universal_access = and /= operators were not properly taken into account in all cases. Tested on x86_64-pc-linux-gnu, committed on trunk gcc/ada/ * sem_type.adb (Add_One_Interp.Is_Universal_Operation): Account for universal_access = operator. (Disambiguate): Take

[Ada] Premature finalization on build in place return and case expression

2020-11-24 Thread Pierre-Marie de Rodat
Is_Finalizable_Transient does not properly handle the case of a return containing an N_Expression_With_Actions (e.g. a case expression), causing a premature finalization of the return object. Tested on x86_64-pc-linux-gnu, committed on trunk gcc/ada/ * exp_util.adb

[Ada] Wrong finalization in call with if expression

2020-11-24 Thread Pierre-Marie de Rodat
Changes made for "Bad access checks on if/case expression as actual" introduced a regression when dealing with transient objects: the processing of function calls in Add_Cond_Expression_Extra_Actual would remove the setting of the "hook" variable needed for proper finalization. Tested on

[Ada] Implement Big_Integer.From_String fully

2020-11-24 Thread Pierre-Marie de Rodat
The previous implementation only supported up to 128bits integers, now provide a full implementation for unbounded integers. Tested on x86_64-pc-linux-gnu, committed on trunk gcc/ada/ * libgnat/a-nbnbin.adb (From_String): Implement fully.diff --git a/gcc/ada/libgnat/a-nbnbin.adb

[Ada] Fix spurious error on child library-level subprogram with aspects

2020-11-24 Thread Pierre-Marie de Rodat
GNAT used to reject such code with a spurious error about the aspect not being attached to the initial declaration. Now fixed. The workaround is to declare a library-level spec for the subprogram, to which the aspects are attached. Tested on x86_64-pc-linux-gnu, committed on trunk gcc/ada/

[Ada] Use high-level Present instead of low-level equality test

2020-11-24 Thread Pierre-Marie de Rodat
Routine Present for Unit_Name_Type was introduced precisely to avoid equality tests with No_Unit_Name. Code cleanup only; semantics is unaffected. Tested on x86_64-pc-linux-gnu, committed on trunk gcc/ada/ * lib-load.adb, lib-writ.adb, lib.adb, par-load.adb, rtsfind.adb,

[Ada] Fix resolution of subtype_indication in delta aggregates

2020-11-24 Thread Pierre-Marie de Rodat
For a Subtype_Indication in ordinary array aggregates we explicitly call Resolve_Discrete_Subtype_Indication; for a Subtype_Indication in delta array aggregates we implicitly call Sem_Ch3.Analyze_Subtype_Indication, which is only meant to be used in declarations, not in expressions. This subtle

[Ada] Remove SPARK-specific expansion of array aggregates

2020-11-24 Thread Pierre-Marie de Rodat
With analysis of the original array aggregate expressions (and not of the copies, as it used to be) and without removing references to index parameters of iterated_component_associations (which only need to be removed when expander is active) we no longer need any SPARK-specific code for array

Re: H8 cc0 conversion

2020-11-24 Thread Hans-Peter Nilsson
On Mon, 23 Nov 2020, Jeff Law wrote: > On 11/23/20 9:49 PM, Hans-Peter Nilsson wrote: > > On Sun, 22 Nov 2020, Jeff Law via Gcc-patches wrote: > >> This is the primary patch for cc0 removal on the H8 port.? It doesn't > >> have any of the optimization work and many patterns are simply disabled >

Re: Add 'dg-note' next to 'dg-optimized', 'dg-missed' (was: [PATCH] dumpfile.c: use prefixes other that 'note: ' for MSG_{OPTIMIZED_LOCATIONS|MISSED_OPTIMIZATION})

2020-11-24 Thread Thomas Schwinge
Hi! Ping. Grüße Thomas On 2020-11-06T10:26:46+0100, I wrote: > Hi, again! > > On 2018-09-25T16:00:14-0400, David Malcolm wrote: >> As noted at Cauldron, dumpfile.c currently emits "note: " for all kinds >> of dump message, so that (after filtering) there's no distinction between >>

Re: [PATCH] dumpfile.c: use prefixes other that 'note: ' for MSG_{OPTIMIZED_LOCATIONS|MISSED_OPTIMIZATION}

2020-11-24 Thread Thomas Schwinge
Hi! On 2020-11-13T15:06:45-0700, Jeff Law wrote: > On 11/6/20 1:50 AM, Thomas Schwinge wrote: >> On 2018-09-25T16:00:14-0400, David Malcolm wrote: >>> The patch adds "dg-optimized" and "dg-missed" directives >> These currently print "(test for *errors*, line [...])". However, these >>

[committed] testsuite: Add testcase for already fixed bug [PR97964]

2020-11-24 Thread Jakub Jelinek via Gcc-patches
Hi! This testcase started failing with r8-2090 and works again starting with r11-4755. Tested on x86_64-linux, committed to trunk as obvious. 2020-11-24 Jakub Jelinek PR tree-optimization/97964 * gcc.dg/tree-ssa/pr97964.c: New test. ---

Re: [PATCH] dumpfile.c: use prefixes other that 'note: ' for MSG_{OPTIMIZED_LOCATIONS|MISSED_OPTIMIZATION}

2020-11-24 Thread Thomas Schwinge
Hi! On 2020-11-13T15:06:24-0700, Jeff Law wrote: > On 11/6/20 1:38 AM, Thomas Schwinge wrote: >> Subject: [PATCH] [testsuite] Enable column location checking for >> 'dg-optimized', 'dg-missed' > OK Thanks, pushed "[testsuite] Enable column location checking for 'dg-optimized', 'dg-missed'" to

Re: [PATCH] middle-end: Prefer no RMW in __builtin_clear_padding implementation where possible

2020-11-24 Thread Richard Biener
On Tue, 24 Nov 2020, Jakub Jelinek wrote: > Hi! > > Currently the __builtin_clear_padding expansion code emits no code for > full words that don't have any padding bits, and most of the time if > the only padding bytes are from the start of the word it attempts to merge > them with previous

RE: [PATCH] middle-end: Support complex Addition

2020-11-24 Thread Richard Biener
On Mon, 23 Nov 2020, Tamar Christina wrote: > Hi Richi, > > > -Original Message- > > From: Richard Biener > > Sent: Monday, November 23, 2020 3:51 PM > > To: Tamar Christina > > Cc: gcc-patches@gcc.gnu.org; nd ; o...@ucw.cz; > > hongtao@intel.com > > Subject: Re: [PATCH]

[committed] openmp: Fix C ICE on OpenMP atomics [PR97958]

2020-11-24 Thread Jakub Jelinek via Gcc-patches
Hi! c_parser_binary_expression was using build2 to create a temporary holder for binary expression that c_parser_atomic and c_finish_omp_atomic can then handle. The latter performs then all the needed checking. Unfortunately, build2 performs some checking too, e.g. PLUS_EXPR vs.

  1   2   >