[PATCH] tree-optimization: [PR102622]: wrong code due to signed one bit integer and "a?-1:0"

2021-10-09 Thread apinski--- via Gcc-patches
From: Andrew Pinski So it turns out this is kinda of a latent bug but not really latent. In GCC 9 and 10, phi-opt would transform a?-1:0 (even for signed 1-bit integer) to -(type)a but the type is an one bit integer which means the negation is undefined. GCC 11 fixed the problem by checking for

Re: *PING* [PATCH] PR fortran/99348, 102521 - ICEs when initializing DT parameter arrays from scalar

2021-10-09 Thread Jerry D via Gcc-patches
This one looks OK.  Sorry I missed it earlier. Thanks again for the patch! Jerry On 10/9/21 12:27 PM, Harald Anlauf via Fortran wrote: *Ping* Am 03.10.21 um 21:20 schrieb Harald Anlauf via Fortran: Dear Fortranners, when initializing parameter arrays from scalars, we did handle only the

Re: [PATCH 0/2] libsanitizer: Merge with upstream commit fdf4c035225d

2021-10-09 Thread Gerald Pfeifer
On Thu, 7 Oct 2021, H.J. Lu wrote: >> Thus breaking bootstrap on FreeBSD: >> >> GCC-HEAD/libsanitizer/sanitizer_common/sanitizer_platform_limits_freebsd.cpp:370:36: >> error: 'MD5_CTX' was not declared in this scope > 370 | const unsigned MD5_CTX_sz = sizeof(MD5_CTX); >> |

Re: [Patch] [v2] Fortran: Fix Bind(C) Array-Descriptor Conversion (Move to Front-End Code)

2021-10-09 Thread Tobias Burnus
Re-sent with gzipped attachment as gcc-patches@ did reject it as being too large. Alternatively, you can find it at https://gcc.gnu.org/pipermail/fortran/attachments/20211009/dc26f92d/attachment-0001.bin as fortran@ contrary to gcc-patches@ did accept the patch ... Tobias On 09.10.21 23:48

Re: [PATCH] Adjust more testcases for O2 vectorization enabling.

2021-10-09 Thread H.J. Lu via Gcc-patches
On Fri, Oct 8, 2021 at 9:55 PM liuhongt wrote: > > Pushed to trunk. > > libgomp/ChangeLog: > > * testsuite/libgomp.c++/scan-10.C: Add option -fvect-cost-model=cheap. > * testsuite/libgomp.c++/scan-11.C: Ditto. > * testsuite/libgomp.c++/scan-12.C: Ditto. > *

*PING* [PATCH] PR fortran/99348, 102521 - ICEs when initializing DT parameter arrays from scalar

2021-10-09 Thread Harald Anlauf via Gcc-patches
*Ping* Am 03.10.21 um 21:20 schrieb Harald Anlauf via Fortran: Dear Fortranners, when initializing parameter arrays from scalars, we did handle only the case init->expr_type == EXPR_CONSTANT, which misses the case of derived types. As a consequence the constructor for the r.h.s. was not set

Re: [PATCH] PR fortran/65454 - accept both old and new-style relational operators

2021-10-09 Thread Harald Anlauf via Gcc-patches
Hi Jerry, > Gesendet: Samstag, 09. Oktober 2021 um 00:28 Uhr > Looks all good Harald, OK and thanks for the support! Thanks for the quick review! Harald

Re: [PATCH] Convert strlen pass from evrp to ranger.

2021-10-09 Thread Aldy Hernandez via Gcc-patches
We seem to be passing a lot of context around in the strlen code. I certainly don't want to contribute to more. Most of the handle_* functions are passing the gsi as well as either ptr_qry or rvals. That looks a bit messy. May I suggest putting all of that in the strlen pass object (well, the

[PATCH] check to see if null pointer is dereferenceable [PR102630]

2021-10-09 Thread Martin Sebor via Gcc-patches
When determining the size of an object compute_objsize_r() assumes that addresses derived from null pointers are not derefernceable because null pointers themselves are not, without calling targetm.addr_space.zero_address_valid() to see if that assumption is supported for the pointer on the

Re: [PATCH] Convert strlen pass from evrp to ranger.

2021-10-09 Thread Martin Sebor via Gcc-patches
On 10/9/21 10:19 AM, Martin Sebor wrote: On 10/9/21 9:04 AM, Aldy Hernandez wrote: On Fri, Oct 8, 2021 at 6:52 PM Martin Sebor wrote: On 10/8/21 9:12 AM, Aldy Hernandez via Gcc-patches wrote: The following patch converts the strlen pass from evrp to ranger, leaving DOM as the last remaining

Re: [PATCH] Convert strlen pass from evrp to ranger.

2021-10-09 Thread Martin Sebor via Gcc-patches
On 10/9/21 9:04 AM, Aldy Hernandez wrote: On Fri, Oct 8, 2021 at 6:52 PM Martin Sebor wrote: On 10/8/21 9:12 AM, Aldy Hernandez via Gcc-patches wrote: The following patch converts the strlen pass from evrp to ranger, leaving DOM as the last remaining user. Thanks for doing this. I know I

Re: [PATCH] Convert strlen pass from evrp to ranger.

2021-10-09 Thread Aldy Hernandez via Gcc-patches
On Fri, Oct 8, 2021 at 6:52 PM Martin Sebor wrote: > > On 10/8/21 9:12 AM, Aldy Hernandez via Gcc-patches wrote: > > The following patch converts the strlen pass from evrp to ranger, > > leaving DOM as the last remaining user. > > Thanks for doing this. I know I said I'd work on it but I'm still

Re: [PATCH] var-tracking: Fix a wrong-debug issue caused by my r10-7665 var-tracking change [PR102441]

2021-10-09 Thread Richard Biener via Gcc-patches
On October 9, 2021 5:26:17 AM GMT+02:00, Alexandre Oliva wrote: >Hello, Jakub, > >On Oct 4, 2021, Jakub Jelinek wrote: > >> Finally, patch2, the shortest patch, uses MO_VAL_SET whenever destination >> is not sp and otherwise drops the micro-operation on the floor. > >That sounds quite

[PATCH] doc: Fix typos in alloc_size documentation

2021-10-09 Thread Daniel Le Duc Khoi Nguyen via Gcc-patches
2021-10-09 Daniel Le * doc/extend.texi (Common Variable Attributes): Fix typos in alloc_size documentation. --- gcc/doc/extend.texi | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/gcc/doc/extend.texi b/gcc/doc/extend.texi index 133b82eef38..10d466fae9a

Re: [PATCH] testsuite: Add missing comment for some dg-warning

2021-10-09 Thread Hongtao Liu via Gcc-patches
On Sat, Oct 9, 2021 at 3:51 PM Kewen.Lin via Gcc-patches wrote: > > Hi, > > This patch fixes the typos introduced by commit r12-4240. > > The dg-warning format looks like: > > { dg-warning regexp [comment [{ target/xfail selector } [line] ]] } > > Some dg-warnings such as: > > { dg-warning

[PATCH] testsuite: Add missing comment for some dg-warning

2021-10-09 Thread Kewen.Lin via Gcc-patches
Hi, This patch fixes the typos introduced by commit r12-4240. The dg-warning format looks like: { dg-warning regexp [comment [{ target/xfail selector } [line] ]] } Some dg-warnings such as: { dg-warning "\\\[-Wstringop-overflow" { target { i?86-*-* x86_64-*-* } } } miss the comment field, it

Re: Add dg-require-wchars to libstdc++ testsuite

2021-10-09 Thread Jonathan Wakely via Gcc-patches
On Fri, 15 Jan 2021, 19:47 Jonathan Wakely, wrote: > > > On Fri, 15 Jan 2021, 16:19 Alexandre Oliva, wrote: > >> On Jan 15, 2021, Jonathan Wakely wrote: >> >> > On Thu, 14 Jan 2021, 22:22 Alexandre Oliva, wrote: >> >> ... it is definitely the case that the target currently defines >> wchar_t,

Re: [PATCH] hardened conditionals

2021-10-09 Thread Richard Biener via Gcc-patches
On October 9, 2021 5:30:04 AM GMT+02:00, Alexandre Oliva via Gcc-patches wrote: > >This patch introduces optional passes to harden conditionals used in >branches, and in computing boolean expressions, by adding redundant >tests of the reversed conditions, and trapping in case of unexpected