Re: [PATCH 0/2] Ranger-based backwards threader implementation.

2021-06-28 Thread Martin Sebor via Gcc-patches
On 6/28/21 10:21 AM, Aldy Hernandez via Gcc-patches wrote: This is the ranger-based backwards threader. It is divided into two parts: the solver and the path discovery bits. The solver is generic enough, that it may be of use to other passes, so it's been abstracted into its own separate class/

Re: [PATCH] define auto_vec copy ctor and assignment (PR 90904)

2021-06-29 Thread Martin Sebor via Gcc-patches
wrote: On 6/1/21 3:56 PM, Martin Sebor wrote: On 5/27/21 2:53 PM, Jason Merrill wrote: On 4/27/21 11:52 AM, Martin Sebor via Gcc-patches wrote: On 4/27/21 8:04 AM, Richard Biener wrote: On Tue, Apr 27, 2021 at 3:59 PM Martin Sebor wrote: On 4/27/21 1:58 AM, Richard Biener wrote: On Tue

Re: [PATCH 1/4] Duplicate the range information of the phi onto the new ssa_name

2021-06-29 Thread Martin Sebor via Gcc-patches
On 6/27/21 5:24 PM, apinski--- via Gcc-patches wrote: From: Andrew Pinski Since match_simplify_replacement uses gimple_simplify, there is a new ssa name created sometimes and then we go and replace the phi edge with this new ssa name, the range information on the phi is lost. Placing this in re

Re: [PATCH 2/4] Allow match-and-simplified phiopt to run in early phiopt

2021-06-29 Thread Martin Sebor via Gcc-patches
On 6/27/21 5:24 PM, apinski--- via Gcc-patches wrote: From: Andrew Pinski To move a few things more to match-and-simplify from phiopt, we need to allow match_simplify_replacement to run in early phiopt. To do this we add a replacement for gimple_simplify that is explictly for phiopt. OK? Boots

Re: [PATCH][gcc] Allow functions without C-style ellipsis to use format attribute

2021-06-29 Thread Martin Sebor via Gcc-patches
On 6/27/21 10:24 PM, Tuan Le Quang via Gcc-patches wrote: Hi, Currently, format attribute can be used to do type-checking for arguments with respect to a format string. However, only functions with a C-style ellipsis can use it. Supporting this attribute for non-variadic functions(functions wit

Re: [PATCH 0/2] Ranger-based backwards threader implementation.

2021-06-29 Thread Martin Sebor via Gcc-patches
On 6/29/21 4:27 AM, Aldy Hernandez wrote: On 6/29/21 1:19 AM, Martin Sebor wrote: On 6/28/21 10:21 AM, Aldy Hernandez via Gcc-patches wrote: This is the ranger-based backwards threader.  It is divided into two parts: the solver and the path discovery bits. The solver is generic enough, that

Re: [PATCH] define auto_vec copy ctor and assignment (PR 90904)

2021-06-29 Thread Martin Sebor via Gcc-patches
, Jason Merrill wrote: On 6/1/21 3:56 PM, Martin Sebor wrote: On 5/27/21 2:53 PM, Jason Merrill wrote: On 4/27/21 11:52 AM, Martin Sebor via Gcc-patches wrote: On 4/27/21 8:04 AM, Richard Biener wrote: On Tue, Apr 27, 2021 at 3:59 PM Martin Sebor wrote: On 4/27/21 1:58 AM, Richard Biener

[PING][PATCH 2/4] remove %G and %K from calls in front end and middle end (PR 98512)

2021-06-30 Thread Martin Sebor via Gcc-patches
Ping. Attached is the same patch rebased on top the latest trunk. As discussed in the review of Aldy's recent changes to the backwards threader, he has run into the same bug the patch fixes. Getting this patch set reviewed and approved would be helpful in keeping him from having to work around

[PING][PATCH 4/4] remove %G and %K support from pretty printer and -Wformat (PR 98512)

2021-06-30 Thread Martin Sebor via Gcc-patches
Ping: https://gcc.gnu.org/pipermail/gcc-patches/2021-June/572519.html On 6/10/21 5:30 PM, Martin Sebor wrote: This final diff removes the handlers for %G and %K from the pretty printer and the support for the directives from c-format.c so that using them will be diagnosed.

Re: [PING][PATCH 2/4] remove %G and %K from calls in front end and middle end (PR 98512)

2021-06-30 Thread Martin Sebor via Gcc-patches
On 6/30/21 9:39 AM, Martin Sebor wrote: Ping.  Attached is the same patch rebased on top the latest trunk. Please see the attached patch instead. The previous one had typo in it. As discussed in the review of Aldy's recent changes to the backwards threader, he has run into the same bug the

Re: [PATCH 3/4] remove %K from error() calls in the aarch64/arm back ends (PR 98512)

2021-06-30 Thread Martin Sebor via Gcc-patches
On 6/11/21 8:46 AM, Martin Sebor wrote: On 6/11/21 3:58 AM, Richard Sandiford wrote: Martin Sebor via Gcc-patches writes: diff --git a/gcc/config/arm/arm.c b/gcc/config/arm/arm.c index 7b37e1b602c..7cdc824730c 100644 --- a/gcc/config/arm/arm.c +++ b/gcc/config/arm/arm.c @@ -13242,13 +13242,8

Re: [PATCH 3/4] remove %K from error() calls in the aarch64/arm back ends (PR 98512)

2021-07-01 Thread Martin Sebor via Gcc-patches
On 7/1/21 2:01 AM, Christophe LYON wrote: On 30/06/2021 21:56, Martin Sebor via Gcc-patches wrote: On 6/11/21 8:46 AM, Martin Sebor wrote: On 6/11/21 3:58 AM, Richard Sandiford wrote: Martin Sebor via Gcc-patches writes: diff --git a/gcc/config/arm/arm.c b/gcc/config/arm/arm.c index

Re: [PATCH 1/4] introduce diagnostic infrastructure changes (PR 98512)

2021-07-01 Thread Martin Sebor via Gcc-patches
On 6/30/21 4:55 PM, David Malcolm wrote: On Tue, 2021-06-15 at 17:00 -0600, Martin Sebor wrote: On 6/11/21 11:04 AM, David Malcolm wrote: On Thu, 2021-06-10 at 17:26 -0600, Martin Sebor wrote: This diff introduces the diagnostic infrastructure changes to support controlling warnings at any cal

Re: [PING][PATCH 2/4] remove %G and %K from calls in front end and middle end (PR 98512)

2021-07-01 Thread Martin Sebor via Gcc-patches
On 6/30/21 5:35 PM, David Malcolm wrote: On Wed, 2021-06-30 at 13:45 -0600, Martin Sebor wrote: On 6/30/21 9:39 AM, Martin Sebor wrote: Ping.  Attached is the same patch rebased on top the latest trunk. Please see the attached patch instead.  The previous one had typo in it. As discussed i

[PATCH] consider parameter names in -Wvla-parameter (PR 97548)

2021-07-01 Thread Martin Sebor via Gcc-patches
-Wvla-parameter relies on operand_equal_p() with OEP_LEXICOGRAPHIC set to compare VLA bounds for equality. But operand_equal_p() doesn't consider decl names, and so nontrivial expressions that refer to the same function parameter are considered unequal by the function, leading to false positives.

PING 2 [PATCH v2 1/2] add -Wuse-after-free

2021-12-13 Thread Martin Sebor via Gcc-patches
e for this choice in my reply below: https://gcc.gnu.org/pipermail/gcc-patches/2021-November/583176.html Martin On 11/23/21 2:16 PM, Martin Sebor wrote: On 11/22/21 6:32 PM, Jeff Law wrote: On 11/1/2021 4:17 PM, Martin Sebor via Gcc-patches wrote: Patch 1 in the series detects a small subset

PING 2 [PATCH v2 2/2] add -Wdangling-pointer [PR #63272]

2021-12-13 Thread Martin Sebor via Gcc-patches
Ping. This patch, originally submitted on Nov. 1, has not been reviewed yet. https://gcc.gnu.org/pipermail/gcc-patches/2021-November/585819.html On 12/6/21 5:51 PM, Martin Sebor wrote: Ping: https://gcc.gnu.org/pipermail/gcc-patches/2021-November/585819.html On 11/30/21 3:55 PM, Martin Sebor

Re: testsuite: Be more informative for ICEs

2021-12-13 Thread Martin Sebor via Gcc-patches
On 12/10/21 3:42 PM, Thomas Schwinge wrote: Hi! OK to push the attached "testsuite: Be more informative for ICEs"? Adding more detail here seems like a useful improvement to me. Martin Grüße Thomas - Siemens Electronic Design Automation GmbH; Anschrift: Arnulfstraße 20

Re: [PATCH] gcc/diagnostic.c: make -Werror message more helpful

2021-12-13 Thread Martin Sebor via Gcc-patches
On 12/12/21 3:13 AM, Andrea Monaco via Gcc-patches wrote: Hello. I propose to make that message more verbose. It sure would have helped me once. You don't always have a Web search available :) Warnings turned into errors have the [-Werror=...] tag at the end so I'm not sure I see when reit

Re: [PATCH RFC] c++: add color to function decl printing

2021-12-13 Thread Martin Sebor via Gcc-patches
On 12/11/21 10:39 PM, Jason Merrill via Gcc-patches wrote: In reading C++ diagnostics, it's often hard to find the name of the function in the middle of the template header, return type, parameters, and template arguments. So let's colorize it, and maybe the template argument bindings while we'r

Re: [PATCH] rs6000: Some builtins require IBM-128 long double format (PR103623)

2021-12-13 Thread Martin Sebor via Gcc-patches
On 12/13/21 8:55 AM, Bill Schmidt via Gcc-patches wrote: Hi! PR103623 shows that we ICE if __builtin_pack_longdouble or __builtin_unpack_longdouble is used when long double is not defined to be the IBM-128 (double-double) format. To solve this, I introduce a new built-in function attribute "ib

Re: [PATCH RFC] c++: add color to function decl printing

2021-12-14 Thread Martin Sebor via Gcc-patches
On 12/13/21 10:41 PM, Jason Merrill wrote: On 12/13/21 14:22, Martin Sebor wrote: On 12/11/21 10:39 PM, Jason Merrill via Gcc-patches wrote: In reading C++ diagnostics, it's often hard to find the name of the function in the middle of the template header, return type, parameters, and template

Re: [Patch]Enable -Wuninitialized + -ftrivial-auto-var-init for address taken variables

2021-12-14 Thread Martin Sebor via Gcc-patches
On 12/14/21 9:43 AM, Qing Zhao wrote: Hi, On Dec 9, 2021, at 12:13 PM, Qing Zhao via Gcc-patches wrote: + return; + + /* Get the variable declaration location from the def_stmt. */ + var_decl_loc = gimple_location (def_stmt); + + /* The LHS of the call

[PATCH] Check for class type before assuming a type is one [PR103703]

2021-12-14 Thread Martin Sebor via Gcc-patches
The attached patch avoids an ICE when using the CLASSTYPE_IMPLICIT_INSTANTIATION() macro with an argument that is not a class type but rather a typename_type. The test case should trigger a warning but doesn't because the code doesn't fully handle explicit instantiations. Martin Check for class

PING [PATCH] enable -Winvalid-memory-order for C++ [PR99612]

2021-12-15 Thread Martin Sebor via Gcc-patches
Ping: https://gcc.gnu.org/pipermail/gcc-patches/2021-December/586402.html Besides PR 99612 this also fixes the false positive reported recently in PR 103372. On 12/8/21 9:49 AM, Martin Sebor wrote: Even with -Wno-system-headers enabled, the -Winvalid-memory-order code tries to make sure calls t

[PATCH] Use enclosing object size if it's smaller than member [PR 101475]

2021-12-16 Thread Martin Sebor via Gcc-patches
Enabling vectorization at -O2 caused quite a few tests for warnings to start failing in GCC 12. These tests were xfailed and bugs were opened to track the problems until they can be fully analyzed and ultimately fixed before GCC 12 is released. I've now started going through these and the first

Re: [PATCH] Use enclosing object size if it's smaller than member [PR 101475]

2022-01-04 Thread Martin Sebor via Gcc-patches
On 12/20/21 12:29 PM, Jeff Law wrote: On 12/16/2021 12:56 PM, Martin Sebor via Gcc-patches wrote: Enabling vectorization at -O2 caused quite a few tests for warnings to start failing in GCC 12.  These tests were xfailed and bugs were opened to track the problems until they can be fully

PING 3 [PATCH v2 1/2] add -Wuse-after-free

2022-01-04 Thread Martin Sebor via Gcc-patches
rote: On 11/22/21 6:32 PM, Jeff Law wrote: On 11/1/2021 4:17 PM, Martin Sebor via Gcc-patches wrote: Patch 1 in the series detects a small subset of uses of pointers made indeterminate by calls to deallocation functions like free or C++ operator delete.  To control the conditions the warnings a

PING 3 [PATCH v2 2/2] add -Wdangling-pointer [PR #63272]

2022-01-04 Thread Martin Sebor via Gcc-patches
Ping: https://gcc.gnu.org/pipermail/gcc-patches/2021-November/585819.html On 12/13/21 9:50 AM, Martin Sebor wrote: Ping.  This patch, originally submitted on Nov. 1, has not been reviewed yet. https://gcc.gnu.org/pipermail/gcc-patches/2021-November/585819.html On 12/6/21 5:51 PM, Martin Sebor

Re: [PATCH] enable -Winvalid-memory-order for C++ [PR99612]

2022-01-05 Thread Martin Sebor via Gcc-patches
On 1/5/22 1:45 AM, Martin Liška wrote: On 12/8/21 17:49, Martin Sebor via Gcc-patches wrote: Even with -Wno-system-headers enabled, the -Winvalid-memory-order code tries to make sure calls to atomic functions with invalid memory orders are diagnosed even though the C atomic functions are

Re: [PATCH 1b/6] Add __attribute__((untrusted))

2022-01-06 Thread Martin Sebor via Gcc-patches
On 1/6/22 8:10 AM, David Malcolm wrote: On Thu, 2021-12-09 at 15:54 -0700, Martin Sebor wrote: On 11/13/21 1:37 PM, David Malcolm via Gcc-patches wrote: This patch adds a new:    __attribute__((untrusted)) for use by the C front-end, intended for use by the Linux kernel for use with "__user"

PING 4 [PATCH v2 2/2] add -Wdangling-pointer [PR #63272]

2022-01-10 Thread Martin Sebor via Gcc-patches
Last ping for this stage 1 feature before stage 3 ends: https://gcc.gnu.org/pipermail/gcc-patches/2021-November/585819.html On 1/4/22 11:02, Martin Sebor wrote: Ping: https://gcc.gnu.org/pipermail/gcc-patches/2021-November/585819.html On 12/13/21 9:50 AM, Martin Sebor wrote: Ping.  This patch,

PING [PATCH] Use enclosing object size if it's smaller than member [PR 101475]

2022-01-10 Thread Martin Sebor via Gcc-patches
Ping (CC'ing Jason as requested): https://gcc.gnu.org/pipermail/gcc-patches/2021-December/587033.html On 1/4/22 10:28, Martin Sebor wrote: On 12/20/21 12:29 PM, Jeff Law wrote: On 12/16/2021 12:56 PM, Martin Sebor via Gcc-patches wrote: Enabling vectorization at -O2 caused quite a few

PING 4 [PATCH v2 1/2] add -Wuse-after-free

2022-01-10 Thread Martin Sebor via Gcc-patches
is choice in my reply below: https://gcc.gnu.org/pipermail/gcc-patches/2021-November/583176.html Martin On 11/23/21 2:16 PM, Martin Sebor wrote: On 11/22/21 6:32 PM, Jeff Law wrote: On 11/1/2021 4:17 PM, Martin Sebor via Gcc-patches wrote: Patch 1 in the series detects a small subset of uses o

Re: [PATCH] Fix -Wformat-diag for rs6000 target.

2022-01-12 Thread Martin Sebor via Gcc-patches
On 1/12/22 02:02, Martin Liška wrote: Hello. We've got -Wformat-diag for some time and I think we should start using it in -Werror for GCC bootstrap. The following patch removes last pieces of the warning for rs6000 target. Ready to be installed? Thanks, Martin gcc/ChangeLog: * config

Re: [PATCH] Fix -Wformat-diag for s390x target.

2022-01-12 Thread Martin Sebor via Gcc-patches
On 1/12/22 02:03, Martin Liška wrote: Hello. We've got -Wformat-diag for some time and I think we should start using it in -Werror for GCC bootstrap. The following patch removes last pieces of the warning for s390x target. Ready to be installed? Thanks, Martin gcc/ChangeLog: * config/

Re: [PATCH] Fix -Wformat-diag for rs6000 target.

2022-01-12 Thread Martin Sebor via Gcc-patches
On 1/12/22 02:02, Martin Liška wrote: Hello. We've got -Wformat-diag for some time and I think we should start using it in -Werror for GCC bootstrap. The following patch removes last pieces of the warning for rs6000 target. Ready to be installed? Thanks, Martin gcc/ChangeLog: * config

Re: [PATCH] Fix -Wformat-diag for rs6000 target.

2022-01-13 Thread Martin Sebor via Gcc-patches
On 1/13/22 05:55, Richard Sandiford wrote: Martin Sebor via Gcc-patches writes: On 1/12/22 02:02, Martin Liška wrote: Hello. We've got -Wformat-diag for some time and I think we should start using it in -Werror for GCC bootstrap. The following patch removes last pieces of the warnin

Re: Document current '-Wuninitialized'/'-Wmaybe-uninitialized' diagnostics for OpenACC test cases

2022-01-13 Thread Martin Sebor via Gcc-patches
On 1/13/22 03:55, Thomas Schwinge wrote: Hi! This has fallen out of (unfinished...) work earlier in the year: pushed to master branch commit 4bd8b1e881f0c26a5103cd1919809b3d63b60ef2 "Document current '-Wuninitialized'/'-Wmaybe-uninitialized' diagnostics for OpenACC test cases". Thanks for the

[COMMITTED] test to verify -Wformat-overflow uses context-sensitive ranges

2022-01-14 Thread Martin Sebor via Gcc-patches
Converting the strlen/sprintf pass to Ranger has considerably improved the accuracy of -Wformat-overflow warnings: they can avoid triggering for safe input even at -O0 while at the same time detect provable overflow. The conversion didn't come with any tests so in r12-6591 I committed one that ve

Re: [Patch][V4][Patch 2/2]Enable -Wuninitialized + -ftrivial-auto-var-init for address taken variables.

2022-01-14 Thread Martin Sebor via Gcc-patches
On 1/14/22 09:30, Qing Zhao wrote: On Jan 14, 2022, at 6:45 AM, Richard Biener wrote: On Thu, Jan 13, 2022 at 2:45 AM Qing Zhao wrote: Hi, Richard, This is the updated version for the second patch, which is mainly the change for "Enable -Wuninitialized + -ftrivial-auto-var-init for add

Re: [Patch][V4][Patch 2/2]Enable -Wuninitialized + -ftrivial-auto-var-init for address taken variables.

2022-01-14 Thread Martin Sebor via Gcc-patches
On 1/14/22 11:29, Qing Zhao wrote: On Jan 14, 2022, at 12:11 PM, Martin Sebor wrote: On 1/14/22 09:30, Qing Zhao wrote: On Jan 14, 2022, at 6:45 AM, Richard Biener wrote: On Thu, Jan 13, 2022 at 2:45 AM Qing Zhao wrote: Hi, Richard, This is the updated version for the second patch, wh

Re: [PATCH v2 1/2] add -Wuse-after-free

2022-01-15 Thread Martin Sebor via Gcc-patches
On 1/11/22 15:40, Jason Merrill wrote: On 11/30/21 17:32, Martin Sebor via Gcc-patches wrote: Attached is a revised patch with the following changes based on your comments: 1) Set and use statement uids to determine which statement     precedes which in the same basic block. 2) Avoid testing

Re: gcc/configure: out of date

2022-01-15 Thread Martin Sebor via Gcc-patches
Martin, I've looked into removing the -Wno-error for this warning for just a subset of targets. It seems doable with some hardcoding in configure.ac but if you're planning to do the cleanup for all of them I'm wondering if we should even bother. What do you think? Martin On 1/14/22 08:46, Mart

Re: [PATCH] middle-end/101292 - invalid memory access with warning control

2022-01-17 Thread Martin Sebor via Gcc-patches
On 1/17/22 07:32, Richard Biener via Gcc-patches wrote: The warning control falls into the C++ trap of using a reference to old hashtable contents for a put operation which can end up re-allocating that before reading from the old freed referenced to source. Fixed by introducing a temporary. I

Re: PING 4 [PATCH v2 2/2] add -Wdangling-pointer [PR #63272]

2022-01-17 Thread Martin Sebor via Gcc-patches
On 1/17/22 06:46, Stephan Bergmann wrote: On 10/01/2022 22:51, Martin Sebor via Gcc-patches wrote: Last ping for this stage 1 feature before stage 3 ends: https://gcc.gnu.org/pipermail/gcc-patches/2021-November/585819.html This hits somewhat unexpectedly at (test case reduced from a hit in

<    6   7   8   9   10   11