[Bug fortran/102043] Wrong array types used for negative stride accesses

2021-11-13 Thread tkoenig at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=102043 --- Comment #13 from Thomas Koenig --- (In reply to Mikael Morin from comment #12) > (In reply to Thomas Koenig from comment #11) > > (In reply to Richard Biener from comment #10) > > > > > Is there any case where the frontend would make

[Bug tree-optimization/103228] [9/10/11/12 Regression] missed optimization with |^ at the gimple level

2021-11-13 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=103228 Andrew Pinski changed: What|Removed |Added Target Milestone|--- |9.5 Known to fail|

[Bug tree-optimization/103228] New: [9/10/11/12 Regression] missed optimization with |^ at the gimple level

2021-11-13 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=103228 Bug ID: 103228 Summary: [9/10/11/12 Regression] missed optimization with |^ at the gimple level Product: gcc Version: 12.0 Status: UNCONFIRMED Keywords:

Re: [PATCH 1/3] gimple-fold: Transform stp*cpy_chk to str*cpy directly

2021-11-13 Thread Siddhesh Poyarekar
On 11/12/21 22:46, Prathamesh Kulkarni wrote: On Fri, 12 Nov 2021 at 01:12, Siddhesh Poyarekar wrote: Avoid going through another folding cycle and use the ignore flag to directly transform BUILT_IN_STPCPY_CHK to BUILT_IN_STRCPY when set, likewise for BUILT_IN_STPNCPY_CHK to BUILT_IN_STPNCPY.

[r12-5236 Regression] FAIL: gcc.dg/tree-prof/merge_block.c scan-tree-dump-not optimized "Invalid sum" on Linux/x86_64

2021-11-13 Thread sunil.k.pandey via Gcc-patches
On Linux/x86_64, 5aa91072e24c1e16a5ec641b48b64c9c9f199f13 is the first bad commit commit 5aa91072e24c1e16a5ec641b48b64c9c9f199f13 Author: Jan Hubicka Date: Sat Nov 13 22:25:23 2021 +0100 Implement DSE of dead functions calls storing memory. caused FAIL: c-c++-common/tsan/free_race2.c

Re: [PATCH 0/6] RFC: adding support to GCC for detecting trust boundaries

2021-11-13 Thread David Malcolm via Gcc-patches
On Sun, 2021-11-14 at 00:20 +0100, Peter Zijlstra wrote: > On Sat, Nov 13, 2021 at 03:37:24PM -0500, David Malcolm wrote: > > > This approach is much less expressive that the custom addres space > > approach; it would only cover the trust boundary aspect; it > > wouldn't > > cover any differences

[PATCH] PR libgomp/103068: Optimize gomp_mutex_lock_slow for x86 target

2021-11-13 Thread Hongyu Wang via Gcc-patches
Hi, >From the CPU's point of view, getting a cache line for writing is more expensive than reading. See Appendix A.2 Spinlock in: https://www.intel.com/content/dam/www/public/us/en/documents/white-papers /xeon-lock-scaling-analysis-paper.pdf The full compare and swap will grab the cache line

[Bug tree-optimization/103189] [12 regression] g++.dg/tree-ssa/pta-delete-1.C etc. FAIL

2021-11-13 Thread hubicka at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=103189 Jan Hubicka changed: What|Removed |Added Last reconfirmed||2021-11-13

[Bug tree-optimization/103223] [12 regression] Access attribute dropped when ipa-sra is applied

2021-11-13 Thread hubicka at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=103223 Jan Hubicka changed: What|Removed |Added Summary|[12 regression] Access |[12 regression] Access

Fix crash in gamess

2021-11-13 Thread Jan Hubicka via Gcc-patches
Hi, this patch adds debug counters for pure/const discover and fixes somewhat embarrasing pasto I made while breaking out ipa_make_function_* helpers out of propagate_pure_const which led to wrong function being marked as pure that in turn leads to wrong code. My apologizes for that.

[Bug middle-end/26163] [meta-bug] missed optimization in SPEC (2k17, 2k and 2k6 and 95)

2021-11-13 Thread hubicka at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=26163 Bug 26163 depends on bug 103211, which changed state. Bug 103211 Summary: [12 Regression] 416.gamess crashes after r12-5177-g494bdadf28d0fb35 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=103211 What|Removed

[Bug ipa/103211] [12 Regression] 416.gamess crashes after r12-5177-g494bdadf28d0fb35

2021-11-13 Thread hubicka at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=103211 Jan Hubicka changed: What|Removed |Added Resolution|--- |FIXED Status|NEW

[Bug ipa/103211] [12 Regression] 416.gamess crashes after r12-5177-g494bdadf28d0fb35

2021-11-13 Thread cvs-commit at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=103211 --- Comment #6 from CVS Commits --- The master branch has been updated by Jan Hubicka : https://gcc.gnu.org/g:6471396dec0cfc30e30e64a70b0d0e6a02de2de7 commit r12-5238-g6471396dec0cfc30e30e64a70b0d0e6a02de2de7 Author: Jan Hubicka Date: Sun

Re: [PATCH 0/6] RFC: adding support to GCC for detecting trust boundaries

2021-11-13 Thread Peter Zijlstra
On Sat, Nov 13, 2021 at 03:37:24PM -0500, David Malcolm wrote: > This approach is much less expressive that the custom addres space > approach; it would only cover the trust boundary aspect; it wouldn't > cover any differences between generic pointers and __user, vs __iomem, > __percpu, and __rcu

[Bug tree-optimization/103216] missed optimization, phiopt/vrp?

2021-11-13 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=103216 --- Comment #6 from Andrew Pinski --- Created attachment 51786 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=51786=edit Patch which I am testing I still need to add testcases (there are many) and finish up the changelog.

gcc-11-20211113 is now available

2021-11-13 Thread GCC Administrator via Gcc
Snapshot gcc-11-2023 is now available on https://gcc.gnu.org/pub/gcc/snapshots/11-2023/ and on various mirrors, see http://gcc.gnu.org/mirrors.html for details. This snapshot has been generated from the GCC 11 git branch with the following options: git://gcc.gnu.org/git/gcc.git branch

[Bug tree-optimization/103216] missed optimization, phiopt/vrp?

2021-11-13 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=103216 --- Comment #5 from Andrew Pinski --- (In reply to Andrew Pinski from comment #4) > (In reply to Andrew Pinski from comment #3) > > I am going to implement this. I think I only need the first conversion (and > > making sure cond goes away

[Bug ipa/103227] 58% exchange2 regression with -Ofast -march=native on zen3 between g:1ae8edf5f73ca5c3 and g:2af63f0f53a12a72

2021-11-13 Thread hubicka at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=103227 --- Comment #3 from Jan Hubicka --- The heuristics here is quite simplistic - it all happens after small function inlining while trying to inline function called once. Each of clones is called once and it really depends on the order we walk

[Bug ipa/103227] 58% exchange2 regression with -Ofast -march=native on zen3 between g:1ae8edf5f73ca5c3 and g:2af63f0f53a12a72

2021-11-13 Thread hubicka at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=103227 --- Comment #2 from Jan Hubicka --- There is difference in inlier decision. Since all clones are of same size it depends on the order inliner picks them and combines together before hitting large-function-growth. It seems that with isra

[Bug ipa/103227] 58% exchange2 regression with -Ofast -march=native on zen3 between g:1ae8edf5f73ca5c3 and g:2af63f0f53a12a72

2021-11-13 Thread hubicka at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=103227 Jan Hubicka changed: What|Removed |Added CC||hubicka at gcc dot gnu.org,

[Bug c++/87656] Useful flags to enable with -Wall or -Wextra

2021-11-13 Thread egallager at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=87656 --- Comment #8 from Eric Gallager --- Any reason not to put -Wnested-externs in -Wall or -Wextra?

[Bug other/21823] MAXPATHLEN usage in [gcc]/fixincludes

2021-11-13 Thread egallager at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=21823 --- Comment #10 from Eric Gallager --- (In reply to CVS Commits from comment #9) > The master branch has been updated by Xi Ruoyao : > > https://gcc.gnu.org/g:04c5a91d068c4ca2f09c2bc206fce00db9d1790b > > commit

[Bug bootstrap/80047] fixincludes/fixincl.c: PVS-Studio: Improper Release of Memory Before Removing Last Reference (CWE-401)

2021-11-13 Thread egallager at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=80047 --- Comment #9 from Eric Gallager --- (In reply to CVS Commits from comment #8) > The master branch has been updated by Xi Ruoyao : > > https://gcc.gnu.org/g:04c5a91d068c4ca2f09c2bc206fce00db9d1790b > > commit

[Bug analyzer/103225] gcc/analyzer/sm-taint.cc:400:25: warning: private field 'm_dir' is not used [-Wunused-private-field]

2021-11-13 Thread egallager at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=103225 Eric Gallager changed: What|Removed |Added CC||egallager at gcc dot gnu.org ---

[Bug fortran/102368] Failure to compile program using the C_SIZEOF function in ISO_C_BINDING

2021-11-13 Thread anlauf at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=102368 anlauf at gcc dot gnu.org changed: What|Removed |Added Status|ASSIGNED|WAITING --- Comment #5 from

[Bug tree-optimization/103227] New: 58% exchange2 regression with -Ofast -march=native on zen3 between g:1ae8edf5f73ca5c3 and g:2af63f0f53a12a72

2021-11-13 Thread hubicka at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=103227 Bug ID: 103227 Summary: 58% exchange2 regression with -Ofast -march=native on zen3 between g:1ae8edf5f73ca5c3 and g:2af63f0f53a12a72 Product: gcc Version: 12.0 Status:

[Bug tree-optimization/103226] New: [12 Regression] Recent change to copy-headers causes execution failure for gcc.dg/torture/pr80974

2021-11-13 Thread law at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=103226 Bug ID: 103226 Summary: [12 Regression] Recent change to copy-headers causes execution failure for gcc.dg/torture/pr80974 Product: gcc Version: 12.0 Status: UNCONFIRMED

[Bug analyzer/103225] gcc/analyzer/sm-taint.cc:400:25: warning: private field 'm_dir' is not used [-Wunused-private-field]

2021-11-13 Thread marxin at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=103225 Martin Liška changed: What|Removed |Added Ever confirmed|0 |1 Last reconfirmed|

[Bug analyzer/103225] New: gcc/analyzer/sm-taint.cc:400:25: warning: private field 'm_dir' is not used [-Wunused-private-field]

2021-11-13 Thread marxin at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=103225 Bug ID: 103225 Summary: gcc/analyzer/sm-taint.cc:400:25: warning: private field 'm_dir' is not used [-Wunused-private-field] Product: gcc Version: 12.0 Status:

[PATCH 3/6] analyzer: implement infoleak detection

2021-11-13 Thread David Malcolm via Gcc-patches
This patch adds a new -Wanalyzer-exposure-through-uninit-copy, emitted by -fanalyzer if it detects copying of uninitialized data through a pointer to an untrusted region. The patch uses region::untrusted_p in the analyzer and __user in the testsuite to identify untrusted regions, but the

[PATCH 6/6] Add __attribute__ ((tainted))

2021-11-13 Thread David Malcolm via Gcc-patches
This patch adds a new __attribute__ ((tainted)) to the C/C++ frontends. It can be used on function decls: the analyzer will treat as tainted all parameters to the function and all buffers pointed to by parameters to the function. Adding this in one place to the Linux kernel's __SYSCALL_DEFINEx

[PATCH 1a/6] RFC: Implement "#pragma GCC custom_address_space"

2021-11-13 Thread David Malcolm via Gcc-patches
This work-in-progress patch adds a new: #prgama GCC custom_address_space(NAME_OF_ADDRESS_SPACE) for use by the C front-end. Currently the custom address spaces are: - disjoint from all other address spaces, *including* the generic one - treated the same as the generic address space at the

[PATCH 5/6] analyzer: use region::untrusted_p in taint detection

2021-11-13 Thread David Malcolm via Gcc-patches
This patch wires up the "untrusted" region logic to the analyzer's taint detection, so that any data copied via a __user pointer (e.g. via a suitably annotated "copy_from_user" decl) is treated as tainted. It includes a series of reproducers for detecting CVE-2011-0521. Unfortunately the analyzer

[PATCH 4b/6] analyzer: implement region::untrusted_p in terms of __attribute__((untrusted))

2021-11-13 Thread David Malcolm via Gcc-patches
gcc/analyzer/ChangeLog: * region.cc (region::untrusted_p): Implement in terms of __attribute__((untrusted)). gcc/testsuite/ChangeLog: * gcc.dg/analyzer/test-uaccess.h: Change from custom_address_space pragma to __attribute__((untrusted)). Signed-off-by: David

[PATCH 0/6] RFC: adding support to GCC for detecting trust boundaries

2021-11-13 Thread David Malcolm via Gcc-patches
[Crossposting between gcc-patches@gcc.gnu.org and linux-toolcha...@vger.kernel.org; sorry about my lack of kernel knowledge, in case of the following seems bogus] I've been trying to turn my prototype from the LPC2021 session on "Adding kernel-specific test coverage to GCC's -fanalyzer option" (

[PATCH 4a/6] analyzer: implement region::untrusted_p in terms of custom address spaces

2021-11-13 Thread David Malcolm via Gcc-patches
gcc/analyzer/ChangeLog: (region::untrusted_p): New. gcc/testsuite/ChangeLog: * gcc.dg/analyzer/test-uaccess.h: New header. Signed-off-by: David Malcolm --- gcc/analyzer/region.cc | 13 + gcc/testsuite/gcc.dg/analyzer/test-uaccess.h | 19

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

2021-11-13 Thread David Malcolm via Gcc-patches
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", but which could be used by other operating system kernels, and potentialy by other projects. Known issues: - at least one TODO in

[PATCH 2/6] Add returns_zero_on_success/failure attributes

2021-11-13 Thread David Malcolm via Gcc-patches
This patch adds two new attributes. The followup patch makes use of the attributes in -fanalyzer. gcc/c-family/ChangeLog: * c-attribs.c (attr_noreturn_exclusions): Add "returns_zero_on_failure" and "returns_zero_on_success". (attr_returns_twice_exclusions): Likewise.

Re: [PATCH] pch: Add support for PCH for relocatable executables

2021-11-13 Thread Iain Sandoe
Hi Folks, IMO both this series - which restores the ability to work with PIE exes but requires a known address for the PCH and the series I posted - which allows a configuration to opt out of PCH anyway could be useful - for Darwin I prefer this series. of course, it would be very nice to

[Bug fortran/102816] [12 Regression] ICE in resolve_structure_cons, at fortran/resolve.c:1467 since r12-4452-g1e819bd95ebeefc1

2021-11-13 Thread anlauf at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=102816 anlauf at gcc dot gnu.org changed: What|Removed |Added Status|ASSIGNED|RESOLVED

[Bug fortran/102685] [12 Regression] ICE in output_constructor_regular_field, at varasm.c:5514 since r12-4278-g74ccca380cde5e79

2021-11-13 Thread anlauf at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=102685 anlauf at gcc dot gnu.org changed: What|Removed |Added Status|ASSIGNED|RESOLVED

[Bug fortran/102715] [12 Regression] ICE in gfc_simplify_transpose, at fortran/simplify.c:8184 since r12-4278-g74ccca380cde5e79

2021-11-13 Thread anlauf at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=102715 anlauf at gcc dot gnu.org changed: What|Removed |Added Resolution|--- |FIXED

[Bug fortran/102817] [12 Regression] ICE in gfc_clear_shape, at fortran/expr.c:422 since r12-4278-g74ccca380cde5e79

2021-11-13 Thread anlauf at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=102817 anlauf at gcc dot gnu.org changed: What|Removed |Added Resolution|--- |FIXED

[Bug fortran/99348] ICE in resolve_structure_cons, at fortran/resolve.c:1286

2021-11-13 Thread anlauf at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=99348 anlauf at gcc dot gnu.org changed: What|Removed |Added Status|ASSIGNED|RESOLVED

[Bug fortran/102521] ICE in gfc_conv_array_initializer, at fortran/trans-array.c:6240

2021-11-13 Thread anlauf at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=102521 anlauf at gcc dot gnu.org changed: What|Removed |Added Status|ASSIGNED|RESOLVED

[Bug tree-optimization/103218] (a < 0) << signbit is not always optimized to a & signbitmask at the gimple level

2021-11-13 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=103218 Andrew Pinski changed: What|Removed |Added URL||https://gcc.gnu.org/piperma

[Bug fortran/103137] [12 Regression] ICE in gfc_simplify_transpose, at fortran/simplify.c:8181 since r12-4967-gbcf3728abe848888

2021-11-13 Thread cvs-commit at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=103137 --- Comment #6 from CVS Commits --- The releases/gcc-10 branch has been updated by Harald Anlauf : https://gcc.gnu.org/g:651d84ae6cb4299ea91c701ff8d9a7c67e076570 commit r10-10272-g651d84ae6cb4299ea91c701ff8d9a7c67e076570 Author: Harald Anlauf

[Bug fortran/103138] [12 Regression] ICE in gfc_simplify_cshift, at fortran/simplify.c:2139 since r12-4967-gbcf3728abe848888

2021-11-13 Thread cvs-commit at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=103138 --- Comment #6 from CVS Commits --- The releases/gcc-10 branch has been updated by Harald Anlauf : https://gcc.gnu.org/g:651d84ae6cb4299ea91c701ff8d9a7c67e076570 commit r10-10272-g651d84ae6cb4299ea91c701ff8d9a7c67e076570 Author: Harald Anlauf

[Bug fortran/102816] [12 Regression] ICE in resolve_structure_cons, at fortran/resolve.c:1467 since r12-4452-g1e819bd95ebeefc1

2021-11-13 Thread cvs-commit at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=102816 --- Comment #5 from CVS Commits --- The releases/gcc-10 branch has been updated by Harald Anlauf : https://gcc.gnu.org/g:63cc40ed45ba2dd5313967364606524c6c621d03 commit r10-10271-g63cc40ed45ba2dd5313967364606524c6c621d03 Author: Harald Anlauf

[Bug fortran/102685] [12 Regression] ICE in output_constructor_regular_field, at varasm.c:5514 since r12-4278-g74ccca380cde5e79

2021-11-13 Thread cvs-commit at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=102685 --- Comment #10 from CVS Commits --- The releases/gcc-10 branch has been updated by Harald Anlauf : https://gcc.gnu.org/g:e2c1283a5c9505257df3cf7a4b42758ef52ea674 commit r10-10270-ge2c1283a5c9505257df3cf7a4b42758ef52ea674 Author: Harald

[Bug fortran/102715] [12 Regression] ICE in gfc_simplify_transpose, at fortran/simplify.c:8184 since r12-4278-g74ccca380cde5e79

2021-11-13 Thread cvs-commit at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=102715 --- Comment #5 from CVS Commits --- The releases/gcc-10 branch has been updated by Harald Anlauf : https://gcc.gnu.org/g:5625599e6f23622447418e6cbfcc080ecd0f2c28 commit r10-10269-g5625599e6f23622447418e6cbfcc080ecd0f2c28 Author: Harald Anlauf

[Bug fortran/102817] [12 Regression] ICE in gfc_clear_shape, at fortran/expr.c:422 since r12-4278-g74ccca380cde5e79

2021-11-13 Thread cvs-commit at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=102817 --- Comment #9 from CVS Commits --- The releases/gcc-10 branch has been updated by Harald Anlauf : https://gcc.gnu.org/g:4b99f0c90f272c5cd94af20f15b95ba702fa0aa6 commit r10-10268-g4b99f0c90f272c5cd94af20f15b95ba702fa0aa6 Author: Harald Anlauf

[Bug fortran/102521] ICE in gfc_conv_array_initializer, at fortran/trans-array.c:6240

2021-11-13 Thread cvs-commit at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=102521 --- Comment #8 from CVS Commits --- The releases/gcc-10 branch has been updated by Harald Anlauf : https://gcc.gnu.org/g:cb85933717e52f1cd91786e6bb595494629ca5c9 commit r10-10267-gcb85933717e52f1cd91786e6bb595494629ca5c9 Author: Harald Anlauf

[Bug fortran/99348] ICE in resolve_structure_cons, at fortran/resolve.c:1286

2021-11-13 Thread cvs-commit at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=99348 --- Comment #7 from CVS Commits --- The releases/gcc-10 branch has been updated by Harald Anlauf : https://gcc.gnu.org/g:cb85933717e52f1cd91786e6bb595494629ca5c9 commit r10-10267-gcb85933717e52f1cd91786e6bb595494629ca5c9 Author: Harald Anlauf

[PATCH] tree-optimization: [PR103218] Fold ((type)(a<0)) << SIGNBITOFA into ((type)a) & signbit

2021-11-13 Thread apinski--- via Gcc-patches
From: Andrew Pinski This folds Fold ((type)(a<0)) << SIGNBITOFA into ((type)a) & signbit inside match.pd. This was already handled in fold-cost by: /* A < 0 ? : 0 is simply (A & ). */ I have not removed as we only simplify "a ? POW2 : 0" at the gimple level to "a << CST1" and fold actually

[Bug tree-optimization/103192] [12 Regression] ICE on libgomp target-in-reduction-2.{C,c}

2021-11-13 Thread hubicka at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=103192 Jan Hubicka changed: What|Removed |Added CC||hubicka at gcc dot gnu.org --- Comment

committed: [PATCH] fixincludes: simplify handling for access() failure [PR21283, PR80047]

2021-11-13 Thread Xi Ruoyao via Gcc-patches
On Sat, 2021-11-13 at 08:13 -0800, Bruce Korb wrote: > Perfect. Committed at r12-5234 with minor format fix. > On 11/12/21 1:58 PM, Xi Ruoyao wrote: > > diff --git a/fixincludes/fixincl.c b/fixincludes/fixincl.c > > index 6dba2f6e830..ee57fbf61b4 100644 > > --- a/fixincludes/fixincl.c > > +++

[Bug other/21823] MAXPATHLEN usage in [gcc]/fixincludes

2021-11-13 Thread cvs-commit at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=21823 --- Comment #9 from CVS Commits --- The master branch has been updated by Xi Ruoyao : https://gcc.gnu.org/g:04c5a91d068c4ca2f09c2bc206fce00db9d1790b commit r12-5234-g04c5a91d068c4ca2f09c2bc206fce00db9d1790b Author: Xi Ruoyao Date: Tue Nov 9

[Bug bootstrap/80047] fixincludes/fixincl.c: PVS-Studio: Improper Release of Memory Before Removing Last Reference (CWE-401)

2021-11-13 Thread cvs-commit at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=80047 --- Comment #8 from CVS Commits --- The master branch has been updated by Xi Ruoyao : https://gcc.gnu.org/g:04c5a91d068c4ca2f09c2bc206fce00db9d1790b commit r12-5234-g04c5a91d068c4ca2f09c2bc206fce00db9d1790b Author: Xi Ruoyao Date: Tue Nov 9

[Bug tree-optimization/103192] [12 Regression] ICE on libgomp target-in-reduction-2.{C,c}

2021-11-13 Thread jakub at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=103192 Jakub Jelinek changed: What|Removed |Added CC||hjl.tools at gmail dot com --- Comment

[Bug libgomp/103224] [12 Regression] FAIL: libgomp.c/../libgomp.c-c++-common/target-in-reduction-2.c (internal compiler error) by r12-5146

2021-11-13 Thread jakub at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=103224 Jakub Jelinek changed: What|Removed |Added Status|UNCONFIRMED |RESOLVED Resolution|---

Cleanup modref_access_node

2021-11-13 Thread Jan Hubicka via Gcc-patches
Hi, this patch moves member functions of modref_access_node from ipa-modref-tree.h to ipa-modref-tree.c since they become long and not fitting for inlines anyway. I also cleaned up the interface by making static insert method (which handles inserting accesses into a vector and optimizing them)

Re: [committed] openmp: Add support for 2 argument num_teams clause

2021-11-13 Thread H.J. Lu via Gcc-patches
On Thu, Nov 11, 2021 at 1:12 AM Jakub Jelinek via Gcc-patches wrote: > > Hi! > > In OpenMP 5.1, num_teams clause can accept either one expression as before, > but it in that case changed meaning, rather than create <= expression > teams it is now create == expression teams. Or it accepts two

[Bug libgomp/103224] New: [12 Regression] FAIL: libgomp.c/../libgomp.c-c++-common/target-in-reduction-2.c (internal compiler error) by r12-5146

2021-11-13 Thread hjl.tools at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=103224 Bug ID: 103224 Summary: [12 Regression] FAIL: libgomp.c/../libgomp.c-c++-common/target-in-reduction- 2.c (internal compiler error) by r12-5146 Product: gcc

[PATCH 0/2] Sync with binutils for building binutils with LTO:

2021-11-13 Thread H.J. Lu via Gcc-patches
Add the --enable-pgo-build[=lto] configure option. When binutils+gdb is not built together with GCC, --enable-pgo-build enables the PGO build: 1. First build with -fprofile-generate. 2. Use "make maybe-check-*" to generate profiling data and pass -i to make to ignore errors when generating

[PATCH 1/2] Sync with binutils: GCC: Pass --plugin to AR and RANLIB

2021-11-13 Thread H.J. Lu via Gcc-patches
Sync with binutils for building binutils with LTO: >From 50ad1254d5030d0804cbf89c758359ae202e8d55 Mon Sep 17 00:00:00 2001 From: "H.J. Lu" Date: Sat, 9 Jan 2021 06:43:11 -0800 Subject: [PATCH] GCC: Pass --plugin to AR and RANLIB Detect GCC LTO plugin. Pass --plugin to AR and RANLIB to support

[PATCH 2/2] Sync with binutils: Support the PGO build for binutils+gdb

2021-11-13 Thread H.J. Lu via Gcc-patches
Sync with binutils for building binutils with LTO: >From af019bfde9b13d628202fe58054ec7ff08d92a0f Mon Sep 17 00:00:00 2001 From: "H.J. Lu" Date: Sat, 9 Jan 2021 06:51:15 -0800 Subject: [PATCH] Support the PGO build for binutils+gdb Add the --enable-pgo-build[=lto] configure option. When

Re: [PATCH] fixincludes: simplify handling for access() failure [PR21283, PR80047]

2021-11-13 Thread Bruce Korb via Gcc-patches
Perfect. On 11/12/21 1:58 PM, Xi Ruoyao wrote: diff --git a/fixincludes/fixincl.c b/fixincludes/fixincl.c index 6dba2f6e830..ee57fbf61b4 100644 --- a/fixincludes/fixincl.c +++ b/fixincludes/fixincl.c @@ -1352,11 +1352,10 @@ process (void) if (access (pz_curr_file, R_OK) != 0) { -

Re: [PATCH v2] IPA: Provide a mechanism to register static DTORs via cxa_atexit.

2021-11-13 Thread Jan Hubicka via Gcc-patches
> sheesh … EWRONGREVISEDPATCH > > > On 5 Nov 2021, at 13:08, Iain Sandoe wrote: > > > > I tried enabling this on x86-64-linux (just for interest) and it seems to > > work > > OK there too - but that testing revealed a thinko that didn’t show with a > > a normal regstrap. > > … now with the

[Bug tree-optimization/103194] [12 Regression] ice in optimize_atomic_bit_test_and with __sync_fetch_and_and since r12-5102-gfb161782545224f5

2021-11-13 Thread hjl.tools at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=103194 H.J. Lu changed: What|Removed |Added Attachment #51784|0 |1 is obsolete|

[Bug tree-optimization/103194] [12 Regression] ice in optimize_atomic_bit_test_and with __sync_fetch_and_and since r12-5102-gfb161782545224f5

2021-11-13 Thread hjl.tools at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=103194 --- Comment #5 from H.J. Lu --- Created attachment 51784 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=51784=edit An incomplete patch Hongtao, can you finish it?

Enable more type attributes for signature changes

2021-11-13 Thread Jan Hubicka via Gcc-patches
Hi, this patch whitelists attributes that are safe for attribute changes and also makes access attribute dropped if function sigunature is changed. We could do better by updating the attribute, but doing so seems to be bit snowballing since with LTO the warnings produced seems bit confused. We

[PATCH] Ada, Darwin : Use DSYMUTIL_FOR_TARGET in libgnat/gnarl builds.

2021-11-13 Thread Iain Sandoe via Gcc-patches
Most of the time we get away with using the dsymutil that is installed with the latest Xcode, however for some cross-compilation cases that does not work. We now have the ability to specify the correct dsymutil to use for the toolchain (--with-dsymutil=) and we should use that specified tool for

[Bug tree-optimization/103176] -foptimize-strlen causes stringop-overflow warning

2021-11-13 Thread josiah_vanderzee at mediacombb dot net via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=103176 --- Comment #6 from Josiah VanderZee --- Thank you, I am grateful that you took your time to explain this so well. I am sorry I opened a bug report without a deeper investigation into whether it was definitely a bug.

[committed] analyzer: add four new taint-based warnings

2021-11-13 Thread David Malcolm via Gcc-patches
The initial commit of the analyzer in GCC 10 had a single warning, -Wanalyzer-tainted-array-index and required manually enabling the taint checker with -fanalyzer-checker=taint (due to scaling issues). This patch extends the taint detection to add four new taint-based warnings:

[Bug c/20785] Pragma STDC * (C99 FP) unimplemented

2021-11-13 Thread egallager at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=20785 Eric Gallager changed: What|Removed |Added Severity|enhancement |normal --- Comment #18 from Eric

Remember fnspec EAF flags in modref summary

2021-11-13 Thread Jan Hubicka via Gcc-patches
Hi, this patch stores eaf flags from fnspec to modref summaries. THis makes them survive signature changes and also improves IPA propagation in case modref is not able to autodetect given flag. Bootstrapped/regtested x86_64-linux, comitted. Honza gcc/ChangeLog: * attr-fnspec.h

[Bug tree-optimization/103222] [12 Regression] wrong code at -O2 and above on x86_64-linux-gnu

2021-11-13 Thread haoxintu at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=103222 --- Comment #6 from Haoxin Tu --- (In reply to Aldy Hernandez from comment #5) > fixed Thank you for the quick fixing!

[Bug tree-optimization/103222] [12 Regression] wrong code at -O2 and above on x86_64-linux-gnu

2021-11-13 Thread aldyh at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=103222 Aldy Hernandez changed: What|Removed |Added Resolution|--- |FIXED Status|NEW

Re: [COMMITTED] path solver: Solve PHI imports first for ranges.

2021-11-13 Thread Aldy Hernandez via Gcc-patches
On Sat, Nov 13, 2021 at 12:55 PM Aldy Hernandez wrote: > > On Sat, Nov 13, 2021 at 10:41 AM Aldy Hernandez wrote: > > > > On Sat, Nov 13, 2021 at 1:51 AM Andrew MacLeod wrote: > > > > > > On 11/12/21 14:50, Richard Biener via Gcc-patches wrote: > > > > On November 12, 2021 8:46:25 PM GMT+01:00,

Re: [COMMITTED] path solver: Solve PHI imports first for ranges.

2021-11-13 Thread Aldy Hernandez via Gcc-patches
On Sat, Nov 13, 2021 at 2:26 PM Richard Biener wrote: > > On November 13, 2021 10:41:02 AM GMT+01:00, Aldy Hernandez > wrote: > >On Sat, Nov 13, 2021 at 1:51 AM Andrew MacLeod wrote: > >> > >> On 11/12/21 14:50, Richard Biener via Gcc-patches wrote: > >> > On November 12, 2021 8:46:25 PM

[Bug tree-optimization/103222] [12 Regression] wrong code at -O2 and above on x86_64-linux-gnu

2021-11-13 Thread cvs-commit at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=103222 --- Comment #4 from CVS Commits --- The master branch has been updated by Aldy Hernandez : https://gcc.gnu.org/g:b7a23949b0dcc4205fcc2be6b84b91441faa384d commit r12-5228-gb7a23949b0dcc4205fcc2be6b84b91441faa384d Author: Aldy Hernandez Date:

Re: [COMMITTED] path solver: Solve PHI imports first for ranges.

2021-11-13 Thread Richard Biener via Gcc-patches
On November 13, 2021 10:41:02 AM GMT+01:00, Aldy Hernandez wrote: >On Sat, Nov 13, 2021 at 1:51 AM Andrew MacLeod wrote: >> >> On 11/12/21 14:50, Richard Biener via Gcc-patches wrote: >> > On November 12, 2021 8:46:25 PM GMT+01:00, Aldy Hernandez via Gcc-patches >> > wrote: >> >> PHIs must be

Re: [PATCH] rs6000: MMA test case emits wrong code when building a vector pair

2021-11-13 Thread Segher Boessenkool
On Wed, Oct 27, 2021 at 08:37:57PM -0500, Peter Bergner wrote: > PR102976 shows a test case where we generate wrong code when building > a vector pair from 2 vector registers. The bug here is that with unlucky > register assignments, we can clobber one of the input operands before > we write both

[Bug sanitizer/102911] AddressSanitizer: CHECK failed: asan_malloc_linux.cpp:46

2021-11-13 Thread hjl.tools at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=102911 --- Comment #4 from H.J. Lu --- Fixed for GCC 12.

[Bug sanitizer/102911] AddressSanitizer: CHECK failed: asan_malloc_linux.cpp:46

2021-11-13 Thread cvs-commit at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=102911 --- Comment #3 from CVS Commits --- The master branch has been updated by H.J. Lu : https://gcc.gnu.org/g:86289a4ff4768fab61f16372650fe85c37f9284e commit r12-5225-g86289a4ff4768fab61f16372650fe85c37f9284e Author: H.J. Lu Date: Fri Nov 12

[PATCH][_GLIBCXX_DEBUG] Code cleanup/simplification

2021-11-13 Thread François Dumont via Gcc-patches
    libstdc++: [_GLIBCXX_DEBUG] Remove _Safe_container<>::_M_safe()     Container code cleanup to get rid of _Safe_container<>::_M_safe() and just     _Safe:: calls which use normal inheritance. Also remove several usages of _M_base()     which can be most of the time ommitted and sometimes

[PATCH] libsanitizer: Merge with upstream

2021-11-13 Thread H.J. Lu via Gcc-patches
Merged revision: 82bc6a094e85014f1891ef9407496f44af8fe442 with the fix for PR sanitizer/102911 --- libsanitizer/MERGE| 2 +- libsanitizer/asan/asan_allocator.cpp | 17 ++- libsanitizer/asan/asan_globals.cpp| 19 +++

[PATCH] PCH: Make the save and restore diagnostics more robust.

2021-11-13 Thread Iain Sandoe via Gcc-patches
When saving, if we cannot obtain a suitable memory segment there is no point in continuing, so exit with an error. When reading in the PCH, we have a situation that the read-in data will replace the line tables used by the diagnostics output. However, the state of the read-in line tables is

Re: [COMMITTED] path solver: Solve PHI imports first for ranges.

2021-11-13 Thread Aldy Hernandez via Gcc-patches
On Sat, Nov 13, 2021 at 10:41 AM Aldy Hernandez wrote: > > On Sat, Nov 13, 2021 at 1:51 AM Andrew MacLeod wrote: > > > > On 11/12/21 14:50, Richard Biener via Gcc-patches wrote: > > > On November 12, 2021 8:46:25 PM GMT+01:00, Aldy Hernandez via Gcc-patches > > > wrote: > > >> PHIs must be

[committed] libstdc++: Implement std::spanstream for C++23

2021-11-13 Thread Jonathan Wakely via Gcc-patches
The tests are just the two small examples from the proposal, so more tests are definitely needed. They can wait for stage 3 though. Tested powerpc64le-linux, pushed to trunk. This implements the header, as proposed for C++23 by P0448R4. libstdc++-v3/ChangeLog: * include/Makefile.am:

[Bug tree-optimization/103222] [12 Regression] wrong code at -O2 and above on x86_64-linux-gnu

2021-11-13 Thread aldyh at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=103222 --- Comment #3 from Aldy Hernandez --- Created attachment 51783 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=51783=edit patch in testing

[Bug tree-optimization/103222] [12 Regression] wrong code at -O2 and above on x86_64-linux-gnu

2021-11-13 Thread aldyh at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=103222 Aldy Hernandez changed: What|Removed |Added Priority|P3 |P1 --- Comment #2 from Aldy Hernandez

Enable ipa-sra for functions with fnspec attribute

2021-11-13 Thread Jan Hubicka via Gcc-patches
Hi, this patch enables some ipa-sra on fortran by allowing signature changes on functions with "fn spec" attribute when ipa-modref is enabled. This is possible since ipa-modref knows how to preserve things we trace in fnspec and fnspec generated by fortran forntend are quite simple and can be

[Bug tree-optimization/103222] [12 Regression] wrong code at -O2 and above on x86_64-linux-gnu

2021-11-13 Thread hubicka at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=103222 Jan Hubicka changed: What|Removed |Added Status|UNCONFIRMED |NEW Ever confirmed|0

[COMMITTED] path solver: Merge path_range_query constructors.

2021-11-13 Thread Aldy Hernandez via Gcc-patches
There's no need for two constructors, when we can do it all with one that defaults to the common behavior: path_range_query (bool resolve = true, gimple_ranger *ranger = NULL); Tested on x86-64 Linux. gcc/ChangeLog: * gimple-range-path.cc (path_range_query::path_range_query): Merge

[Bug c++/95639] wrong error location

2021-11-13 Thread egallager at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=95639 Eric Gallager changed: What|Removed |Added CC||egallager at gcc dot gnu.org ---

[Bug c/66773] sign-compare warning for == and != are pretty useless

2021-11-13 Thread egallager at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66773 Eric Gallager changed: What|Removed |Added CC||egallager at gcc dot gnu.org ---

[Bug tree-optimization/103223] New: [12 regression] Access attribute prevents IPA optimization

2021-11-13 Thread hubicka at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=103223 Bug ID: 103223 Summary: [12 regression] Access attribute prevents IPA optimization Product: gcc Version: 12.0 Status: UNCONFIRMED Severity: normal

Re: [PATCH] Combine malloc + memset to calloc

2021-11-13 Thread Prathamesh Kulkarni via Gcc-patches
On Sat, 13 Nov 2021 at 02:00, Seija K. via Gcc-patches wrote: > > diff --git a/gcc/ada/terminals.c b/gcc/ada/terminals.c > index a2dd4895d48..25d9acda752 100644 > --- a/gcc/ada/terminals.c > +++ b/gcc/ada/terminals.c > @@ -609,8 +609,7 @@ __gnat_setup_communication (struct TTY_Process** >

  1   2   >