Re: [PATCH] rs6000: fmr gets used instead of faster xxlor [PR93571]

2023-02-24 Thread Ajit Agarwal via Gcc-patches
Hello Segher: On 24/02/23 8:41 pm, Segher Boessenkool wrote: > Hi! > > For future patches: please don't send patches as replies to existing > threads. Just start a new thread for a new patch (series). You can > mark it as [PATCH v2] in the subject, if you want. > > On Fri, Feb 24, 2023 at

[Bug target/55218] armv6 doesn't use unaligned access for packed structures

2023-02-24 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=55218 Andrew Pinski changed: What|Removed |Added Status|UNCONFIRMED |NEW Last reconfirmed|

[Bug middle-end/55658] bitfields and __attribute__((packed)) generate horrible code on x86_64

2023-02-24 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=55658 Andrew Pinski changed: What|Removed |Added CC||rogero at howzatt dot co.uk --- Comment

[Bug tree-optimization/66364] poor optimization of packed structs containing bitfields

2023-02-24 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66364 Andrew Pinski changed: What|Removed |Added Resolution|--- |DUPLICATE Status|ASSIGNED

[Bug middle-end/55658] bitfields and __attribute__((packed)) generate horrible code on x86_64

2023-02-24 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=55658 Andrew Pinski changed: What|Removed |Added Assignee|unassigned at gcc dot gnu.org |pinskia at gcc dot gnu.org

[Bug middle-end/108920] Condition falsely optimized out

2023-02-24 Thread agner at agner dot org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=108920 --- Comment #3 from Agner Fog --- It seems to work with gcc 9.4.0. Thank you

[Bug target/108922] fmod() 13x slowdown in gcc4.9 dropping "fprem" and calling fmod()

2023-02-24 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=108922 Andrew Pinski changed: What|Removed |Added Ever confirmed|0 |1 Last reconfirmed|

[Bug target/108922] fmod() 13x slowdown in gcc4.9 dropping "fprem" and calling fmod()

2023-02-24 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=108922 --- Comment #1 from Andrew Pinski --- >The committer also claims "fixes ieee_2.f90 testsuite failure" but I have no >idea where to find this testsuite. ./testsuite/gfortran.dg/ieee/ieee_2.f90

Re: [PATCH] RISC-V: Disable attribute generation by default

2023-02-24 Thread Palmer Dabbelt
On Fri, 24 Feb 2023 05:09:30 PST (-0800), gcc-patches@gcc.gnu.org wrote: It did help people to identify what extension used in the binary, so I would prefer keep that enable by default. IMO it actually hurts more than helps, as it's not really encoding what extensions are in the binary (or

[Bug middle-end/108920] Condition falsely optimized out

2023-02-24 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=108920 Andrew Pinski changed: What|Removed |Added See Also||https://gcc.gnu.org/bugzill

[Bug c++/108893] attribute access read_only

2023-02-24 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=108893 --- Comment #7 from Andrew Pinski --- access attribute says if it is access, then it will be that. It does not say it MUST be accessed. That is what nonnull is for. >I didn't want to use __attribute__((nonnull)) because the optimizer may use

[Bug c++/108893] attribute access read_only

2023-02-24 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=108893 Andrew Pinski changed: What|Removed |Added Resolution|DUPLICATE |INVALID --- Comment #6 from Andrew

[Bug c++/108893] attribute access read_only

2023-02-24 Thread jg at jguk dot org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=108893 --- Comment #5 from Jonny Grant --- Here is an example, no warnings during compilation. https://godbolt.org/z/h8E7r3Wf8 #include // Try get a build warning for nullptr dereference __attribute__ ((access (read_only, 1, 2))) void f(char * s,

[Bug c++/108930] Internal compiler error with -fopenmp (tsubst_omp_for_iterator)

2023-02-24 Thread michael_greenburg at byu dot edu via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=108930 --- Comment #2 from michael_greenburg at byu dot edu --- Created attachment 54535 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=54535=edit The *.ii file from `-save-temps`

[Bug c++/108930] Internal compiler error with -fopenmp (tsubst_omp_for_iterator)

2023-02-24 Thread michael_greenburg at byu dot edu via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=108930 --- Comment #1 from michael_greenburg at byu dot edu --- Created attachment 54534 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=54534=edit The *.out file from `-freport-bug`

[Bug c++/108930] New: Internal compiler error with -fopenmp (tsubst_omp_for_iterator)

2023-02-24 Thread michael_greenburg at byu dot edu via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=108930 Bug ID: 108930 Summary: Internal compiler error with -fopenmp (tsubst_omp_for_iterator) Product: gcc Version: 12.1.0 Status: UNCONFIRMED Severity: normal

gcc-11-20230224 is now available

2023-02-24 Thread GCC Administrator via Gcc
Snapshot gcc-11-20230224 is now available on https://gcc.gnu.org/pub/gcc/snapshots/11-20230224/ 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 ipa/108871] attribute nonnull does not spot nullptr O2 and above when function inlined

2023-02-24 Thread jg at jguk dot org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=108871 --- Comment #7 from Jonny Grant --- (In reply to Jakub Jelinek from comment #6) > (In reply to Jonathan Wakely from comment #5) > > (In reply to Andrew Pinski from comment #3) > > > *** Bug 108893 has been marked as a duplicate of this bug. ***

Re: Support for WEAK attribute, part 2

2023-02-24 Thread Harald Anlauf via Gcc-patches
Hi Rimvydas, Am 24.02.23 um 06:16 schrieb Rimvydas Jasinskas via Gcc-patches: On Thu, Feb 23, 2023 at 10:53 PM Harald Anlauf wrote: the patch is mostly fine, but there is a minor style issue: + if (sym->attr.ext_attr & (1 << EXT_ATTR_WEAK)) + gfc_error ("Symbol %qs at %L has the

[Bug fortran/108923] memory leak of get_intrinsic_dummy_arg result

2023-02-24 Thread anlauf at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=108923 anlauf at gcc dot gnu.org changed: What|Removed |Added CC||anlauf at gcc dot gnu.org

Re: [Patch] Fortran: Skip bound conv in gfc_conv_gfc_desc_to_cfi_desc with intent(out) ptr [PR108621]

2023-02-24 Thread Harald Anlauf via Gcc-patches
Hi Tobias, Am 24.02.23 um 12:31 schrieb Tobias Burnus: (B) The attached patch: With 'intent(out)' there is no reason to do the conversions. While for nullified pointers the bounds-conversion loop is skipped, it may still be executed for undefined pointers. (Which is usually harmless.) In

[pushed] fortran: Plug leak of associated_dummy memory. [PR108923]

2023-02-24 Thread Mikael Morin
Hello, I have just pushed a for PR108923 (a memory leak). It fixes the small reproducer that I pasted in bugzilla, and I have run it through the fortran regression testsuite. More details in the patch.From 545a7d5da5fcc338e29c5241b574ac99d03f4454 Mon Sep 17 00:00:00 2001 From: Mikael Morin

[Bug fortran/108923] memory leak of get_intrinsic_dummy_arg result

2023-02-24 Thread cvs-commit at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=108923 --- Comment #4 from CVS Commits --- The master branch has been updated by Mikael Morin : https://gcc.gnu.org/g:24c9edfa73632276d7698c103f35833f29804d98 commit r13-6337-g24c9edfa73632276d7698c103f35833f29804d98 Author: Mikael Morin Date:

[Bug fortran/68800] Fortran FE produces many memory leaks

2023-02-24 Thread anlauf at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=68800 anlauf at gcc dot gnu.org changed: What|Removed |Added CC||anlauf at gcc dot gnu.org

[Bug fortran/108924] memory leak in doloop_warn

2023-02-24 Thread anlauf at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=108924 anlauf at gcc dot gnu.org changed: What|Removed |Added Status|UNCONFIRMED |ASSIGNED Last

[PATCH, committed] Fortran: frontend passes do_subscript leaks gmp memory [PR108924]

2023-02-24 Thread Harald Anlauf via Gcc-patches
Dear all, as reported by Richard - although without a testcase - we leak gmp memory in do_subscript(). The attached patch was derived by inspection of the code pointed at by valgrind and regtested on x86_64-pc-linux-gnu. Committed as obvious as commit

[Bug bootstrap/108929] bfin-openbsd: Issues calling `as` when trying to build Module-2 components

2023-02-24 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=108929 Andrew Pinski changed: What|Removed |Added Resolution|--- |INVALID Status|WAITING

[Bug fortran/108924] memory leak in doloop_warn

2023-02-24 Thread cvs-commit at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=108924 --- Comment #2 from CVS Commits --- The master branch has been updated by Harald Anlauf : https://gcc.gnu.org/g:45f406c4f62e516b58dcda20b5a7aa43ff0aa0f3 commit r13-6336-g45f406c4f62e516b58dcda20b5a7aa43ff0aa0f3 Author: Harald Anlauf Date:

[Bug driver/108929] bfin-openbsd: Issues calling `as` when trying to build Module-2 components

2023-02-24 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=108929 Andrew Pinski changed: What|Removed |Added Ever confirmed|0 |1 Status|UNCONFIRMED

[Bug driver/108929] New: bfin-openbsd: Issues calling `as` when trying to build Module-2 components

2023-02-24 Thread jbglaw--- via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=108929 Bug ID: 108929 Summary: bfin-openbsd: Issues calling `as` when trying to build Module-2 components Product: gcc Version: 13.0 Status: UNCONFIRMED Severity:

[Bug d/106977] [13 regression] d21 dies with SIGBUS on 32-bit Darwin

2023-02-24 Thread iains at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=106977 --- Comment #30 from Iain Sandoe --- (In reply to ibuclaw from comment #29) > (In reply to Iain Sandoe from comment #27) > > great! > > > > we make more progress now - at least past libphobos configure: > > > > we now fail building

[Bug fortran/108923] memory leak of get_intrinsic_dummy_arg result

2023-02-24 Thread mikael at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=108923 --- Comment #3 from Mikael Morin --- Here is a small reproducer by the way: program p implicit none call s(0) contains subroutine s(i) integer :: i end subroutine s end program p

[Bug fortran/108923] memory leak of get_intrinsic_dummy_arg result

2023-02-24 Thread mikael at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=108923 --- Comment #2 from Mikael Morin --- (In reply to Mikael Morin from comment #1) > Should be easy to fix anyway. Not that easy after all. The following (obvious) fix regresses heavily. diff --git a/gcc/fortran/expr.cc b/gcc/fortran/expr.cc

[Bug target/86802] riscv port needs updating for CVE-2017-5753

2023-02-24 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=86802 Andrew Pinski changed: What|Removed |Added Assignee|wilson at gcc dot gnu.org |unassigned at gcc dot gnu.org

[Bug target/108928] New: epiphany-elf: unrecognizable insn (internal compiler error: in extract_insn, at recog.cc:2791) triggered during Modula-2 build

2023-02-24 Thread jbglaw--- via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=108928 Bug ID: 108928 Summary: epiphany-elf: unrecognizable insn (internal compiler error: in extract_insn, at recog.cc:2791) triggered during Modula-2 build Product: gcc

[Bug libstdc++/108846] std::copy, std::copy_n and std::copy_backward on potentially overlapping subobjects

2023-02-24 Thread dangelog at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=108846 --- Comment #12 from Giuseppe D'Angelo --- (In reply to Jonathan Wakely from comment #9) > (In reply to Giuseppe D'Angelo from comment #5) > > https://github.com/gcc-mirror/gcc/blob/master/libstdc%2B%2B-v3/include/bits/ > >

[PATCH 2/2] testsuite: Fix gcc.dg/analyzer/allocation-size-multiline-3.c

2023-02-24 Thread Hans-Peter Nilsson via Gcc-patches
I'll install this as obvious provided that the prerequisite multiline.exp patch is approved. -- >8 -- For 32-bit newlib targets (such as cris-elf and pru-elf), that int32_t is "long int". See other regexps in the testsuite matching "aka (long )?int" (with single-quotes where needed) where the

[PATCH 1/2] testsuite: Provide means to regexp in multiline patterns

2023-02-24 Thread Hans-Peter Nilsson via Gcc-patches
Ok to commit? -- >8 -- Those multi-line-patterns are literal. Sometimes a regexp needs to be matched. This is a start: just three elements are supported: "(" ")" and the compound ")?" (and on second thought, it can be argued that "(...)" alone is not useful). Note that Tcl "string map" is

Re: [PATCH] testsuite: Don't include multiline regexps in the the pass/fail log

2023-02-24 Thread David Malcolm via Gcc-patches
On Fri, 2023-02-24 at 18:54 +0100, Hans-Peter Nilsson wrote: > Ok to commit? Looks good to me [1] Thanks Dave [1] though FWIW although I wrote this code, my DejaGnu skills are weak and I'm not a testsuite maintainer :-/ > > -- >8 -- > I see overlong lines in the output when a test fails, for

[Bug libstdc++/108030] `std::experimental::simd` not inlined

2023-02-24 Thread mkretz at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=108030 Matthias Kretz (Vir) changed: What|Removed |Added Status|NEW |ASSIGNED --- Comment #13 from

Re: [PATCH 6/8] libstdc++: Fix formatting

2023-02-24 Thread Matthias Kretz via Gcc-patches
On Friday, 24 February 2023 18:14:53 CET Jonathan Wakely wrote: > Looks like there are a few remaining spaces that could be removed > where you've joined lines, e.g. Fixed and pushed. > OK for trunk anyway (and the branches if you want). I'll likely backport after I backported all other patches

[Bug libstdc++/108030] `std::experimental::simd` not inlined

2023-02-24 Thread cvs-commit at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=108030 --- Comment #12 from CVS Commits --- The master branch has been updated by Matthias Kretz : https://gcc.gnu.org/g:e37b04328ae68f91efe1fb2c5de9122be34bc74a commit r13-6334-ge37b04328ae68f91efe1fb2c5de9122be34bc74a Author: Matthias Kretz Date:

[Bug libstdc++/108856] Increment and decrement on std::experimental::where_expression should optimize better

2023-02-24 Thread cvs-commit at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=108856 --- Comment #2 from CVS Commits --- The master branch has been updated by Matthias Kretz : https://gcc.gnu.org/g:6ce55180d494b616e2e3e68ffedfe9007e42ca06 commit r13-6333-g6ce55180d494b616e2e3e68ffedfe9007e42ca06 Author: Matthias Kretz Date:

[Bug d/106977] [13 regression] d21 dies with SIGBUS on 32-bit Darwin

2023-02-24 Thread ibuclaw at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=106977 --- Comment #29 from ibuclaw at gcc dot gnu.org --- (In reply to Iain Sandoe from comment #27) > great! > > we make more progress now - at least past libphobos configure: > > we now fail building druntime/core/atomic.d and I am not quite sure

[r13-6278 Regression] FAIL: gcc.dg/vect/vect-simd-clone-18f.c scan-tree-dump-times vect "[\\n\\r] [^\\n]* = foo\\.simdclone" 2 on Linux/x86_64

2023-02-24 Thread haochen.jiang via Gcc-patches
On Linux/x86_64, 3da77f217c8b2089ecba3eb201e727c3fcdcd19d is the first bad commit commit 3da77f217c8b2089ecba3eb201e727c3fcdcd19d Author: Andrew Stubbs Date: Thu Jul 28 16:07:22 2022 +0100 vect: inbranch SIMD clones caused FAIL: gcc.dg/vect/vect-simd-clone-16.c scan-tree-dump-times vect

[V4][PATCH 2/2] Update documentation to clarify a GCC extension

2023-02-24 Thread Qing Zhao via Gcc-patches
on a structure with a C99 flexible array member being nested in another structure. "GCC extension accepts a structure containing an ISO C99 "flexible array member", or a union containing such a structure (possibly recursively) to be a member of a structure. There are two situations: * The

[v4][PATCH 1/2] Handle component_ref to a structre/union field including C99 FAM [PR101832]

2023-02-24 Thread Qing Zhao via Gcc-patches
GCC extension accepts the case when a struct with a C99 flexible array member is embedded into another struct or union (possibly recursively). __builtin_object_size should treat such struct as flexible size. gcc/c/ChangeLog: PR tree-optimization/101832 * c-decl.cc

[V4][PATCH 0/2] Handle component_ref to a structure/union field including FAM for builtin_object_size

2023-02-24 Thread Qing Zhao via Gcc-patches
Hi, Joseph and Richard, Could you please review this patch and let me know whether it???s ready for committing into GCC13? The fix to Bug PR101832 is an important patch for kernel security purpose. it's better to be put into GCC13. = These are the 4th version of

[Bug d/106977] [13 regression] d21 dies with SIGBUS on 32-bit Darwin

2023-02-24 Thread iains at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=106977 --- Comment #28 from Iain Sandoe --- (In reply to Iain Sandoe from comment #27) > great! > > we make more progress now - at least past libphobos configure: > > we now fail building druntime/core/atomic.d and I am not quite sure how to >

[PATCH] testsuite: Don't include multiline regexps in the the pass/fail log

2023-02-24 Thread Hans-Peter Nilsson via Gcc-patches
Ok to commit? -- >8 -- I see overlong lines in the output when a test fails, for example for a bug exposed for cris-elf and pru-elf in gcc.dg/analyzer/allocation-size-multiline-3.c: Running /x/gcc/testsuite/gcc.dg/analyzer/analyzer.exp ... FAIL: gcc.dg/analyzer/allocation-size-multiline-3.c

[Bug d/106977] [13 regression] d21 dies with SIGBUS on 32-bit Darwin

2023-02-24 Thread iains at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=106977 --- Comment #27 from Iain Sandoe --- great! we make more progress now - at least past libphobos configure: we now fail building druntime/core/atomic.d and I am not quite sure how to interpret the backtrace (from b internal_error). (lldb) bt

[Bug fortran/108921] ICE: using the result of an impure function in automatic character allocation

2023-02-24 Thread kargl at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=108921 kargl at gcc dot gnu.org changed: What|Removed |Added Priority|P3 |P4 Keywords|

Re: [PATCH 6/8] libstdc++: Fix formatting

2023-02-24 Thread Jonathan Wakely via Gcc-patches
On Thu, 23 Feb 2023 at 08:54, Matthias Kretz via Libstdc++ wrote: > > > > Whitespace changes only. Looks like there are a few remaining spaces that could be removed where you've joined lines, e.g. +{ return static_cast<_Up*>( __builtin_assume_aligned(__ptr, _S_alignment<_Tp, _Up>)); } and

Re: [PATCH 5/8] libstdc++: Always-inline most of non-cmath fixed_size implementation

2023-02-24 Thread Jonathan Wakely via Gcc-patches
On Thu, 23 Feb 2023 at 08:54, Matthias Kretz via Libstdc++ wrote: > > > > For simd, the inlining behavior should be similar to builtin types. (No > operator on buitin types is ever translated into a function call.) > Therefore, always_inline is the right choice (i.e. inline on -O0 as > well). OK

Re: [PATCH 3/8] libstdc++: More efficient masked inc-/decrement implementation

2023-02-24 Thread Jonathan Wakely via Gcc-patches
On Thu, 23 Feb 2023 at 08:55, Matthias Kretz via Libstdc++ wrote: > OK for trunk (and maybe backport later if you want to). > > Signed-off-by: Matthias Kretz > > libstdc++-v3/ChangeLog: > > PR libstdc++/108856 > * include/experimental/bits/simd_builtin.h >

[Bug target/108927] error: too few arguments to function 'long unsigned int __riscv_vsetvlmax_e8mf8(void)'

2023-02-24 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=108927 --- Comment #1 from Andrew Pinski --- You are using a month old sources, can you try with a much newer trunk sources?

[Bug fortran/108923] memory leak of get_intrinsic_dummy_arg result

2023-02-24 Thread mikael at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=108923 Mikael Morin changed: What|Removed |Added Assignee|unassigned at gcc dot gnu.org |mikael at gcc dot gnu.org

Re: Missed warning (-Wuse-after-free)

2023-02-24 Thread Martin Uecker via Gcc
Am Freitag, dem 24.02.2023 um 10:01 -0600 schrieb Serge E. Hallyn: > On Fri, Feb 24, 2023 at 09:36:45AM +0100, Martin Uecker wrote: > > Am Donnerstag, dem 23.02.2023 um 19:21 -0600 schrieb Serge E. Hallyn: ... > > > > Yes, but one comment about terminology:. The C standard > > differentiates

[PATCH] testsuite: Add -fno-ivopts to gcc.dg/Wuse-after-free-2.c, PR108828

2023-02-24 Thread Hans-Peter Nilsson via Gcc-patches
Ok to commit? I suggest that when committed I'll also set the bugzilla entry in SUSPENDED mode, as opposed to RESOLVED. I mean, the issue isn't really solved; that'd be a patch improving pointer tracking across ivopts. -- >8 -- For cris-elf before this patch, ever since it was added, this test

[Bug fortran/108924] memory leak in doloop_warn

2023-02-24 Thread anlauf at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=108924 anlauf at gcc dot gnu.org changed: What|Removed |Added CC||anlauf at gcc dot gnu.org

[Bug c++/108927] New: error: too few arguments to function 'long unsigned int __riscv_vsetvlmax_e8mf8(void)'

2023-02-24 Thread malat at debian dot org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=108927 Bug ID: 108927 Summary: error: too few arguments to function 'long unsigned int __riscv_vsetvlmax_e8mf8(void)' Product: gcc Version: 13.0 Status: UNCONFIRMED

Re: Missed warning (-Wuse-after-free)

2023-02-24 Thread Serge E. Hallyn
On Fri, Feb 24, 2023 at 02:42:32AM +0100, Alex Colomar wrote: > Hi Serge, Martin, > > On 2/24/23 02:21, Serge E. Hallyn wrote: > > > Does all this imply that the following is well defined behavior (and shall > > > print what one would expect)? > > > > > >free(p); > > > > > >(void) //

[GSoC] Introduction and query on LTO object emmission project

2023-02-24 Thread Peter Lafreniere via Gcc
Hi! I've been interested in compiler development for a while, and would love to work with any of you as part of GSoC, or even just as a side-project on my own. I'm an 18 year-old student going into university next year with a passion for all things open source and low level. I consider myself

Re: Missed warning (-Wuse-after-free)

2023-02-24 Thread Serge E. Hallyn
On Fri, Feb 24, 2023 at 09:36:45AM +0100, Martin Uecker wrote: > Am Donnerstag, dem 23.02.2023 um 19:21 -0600 schrieb Serge E. Hallyn: > > On Fri, Feb 24, 2023 at 01:02:54AM +0100, Alex Colomar wrote: > > > Hi Martin, > > > > > > On 2/23/23 20:57, Martin Uecker wrote: > > > > Am Donnerstag, dem

[GSoC][C++: Compiler Built-in Traits]: Example Impls & Small Patches

2023-02-24 Thread Ken Matsui via Gcc
Hi, My name is Ken Matsui. I am highly interested in contributing to the project idea, "C++: Implement compiler built-in traits for the standard library traits." To understand how to implement those traits, could you please give me some example implementations of the compiler built-in traits, as

[Bug middle-end/108545] [13 Regression] ICE in install_var_field, at omp-low.cc:799 since r13-2665-g23baa717c991d77f

2023-02-24 Thread burnus at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=108545 --- Comment #4 from Tobias Burnus --- For the C/C++ testcase of comment 3, bisecting points to commit r12-5835-g0ab29cf0bb68960c1f87405f14b4fb2109254e2f "openmp: Improve OpenMP target support for C++ (PR92120)"

Re: [PATCH v3 09/11] riscv: thead: Add support for the XTheadMemPair ISA extension

2023-02-24 Thread Kito Cheng via Gcc-patches
Could you move those thead_* and th_* functions into thead.cc > +static bool > +thead_mempair_operand_p (rtx mem, machine_mode mode) > +{ > + if (!MEM_SIZE_KNOWN_P (mem)) > +return false; > + > + /* Only DI or SI mempair instructions exist. */ add gcc_assert (mode == SImode || mode ==

[Bug c/108896] provide "element_count" attribute to give more context to __builtin_dynamic_object_size() and -fsanitize=bounds

2023-02-24 Thread muecker at gwdg dot de via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=108896 Martin Uecker changed: What|Removed |Added CC||muecker at gwdg dot de --- Comment #4

[Bug target/108840] Aarch64 doesn't optimize away shift counter masking

2023-02-24 Thread ktkachov at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=108840 --- Comment #3 from ktkachov at gcc dot gnu.org --- Created attachment 54531 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=54531=edit Candidate patch Candidate patch attached.

[Bug demangler/107884] H8/300: cp-demangle.c fix warning related demangle.h

2023-02-24 Thread mike at mnmoran dot org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=107884 --- Comment #8 from Michael N. Moran --- I tried to build with after patching with https://gcc.gnu.org/bugzilla/attachment.cgi?id=53980 and now get an assembler failure. /tmp/cc2C1wMh.s: Assembler messages: /tmp/cc2C1wMh.s:82060: Error: value

[Bug demangler/107884] H8/300: cp-demangle.c fix warning related demangle.h

2023-02-24 Thread mike at mnmoran dot org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=107884 Michael N. Moran changed: What|Removed |Added CC||mike at mnmoran dot org --- Comment

[Bug sanitizer/108834] LTO: ltrans temporary file is used as module name in ASAN

2023-02-24 Thread marxin at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=108834 Martin Liška changed: What|Removed |Added Known to fail||12.2.0 Known to work|

[Bug sanitizer/108834] LTO: ltrans temporary file is used as module name in ASAN

2023-02-24 Thread cvs-commit at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=108834 --- Comment #11 from CVS Commits --- The master branch has been updated by Martin Liska : https://gcc.gnu.org/g:94c9b1bb79f63d000ebb05efc155c149325e332d commit r13-6330-g94c9b1bb79f63d000ebb05efc155c149325e332d Author: Martin Liska Date:

Re: [PATCH] asan: adjust module name for global variables

2023-02-24 Thread Martin Liška
On 2/24/23 10:07, Jakub Jelinek wrote: > On Fri, Feb 24, 2023 at 10:00:01AM +0100, Martin Liška wrote: >> As mentioned in the PR, when we use LTO, we wrongly use ltrans output >> file name as a module name of a global variable. That leads to a >> non-reproducible output. >> >> After the suggested

[PATCH] RISC-V: Add testcase for VSETVL PASS

2023-02-24 Thread juzhe . zhong
From: Ju-Zhe Zhong gcc/testsuite/ChangeLog: * gcc.target/riscv/rvv/base/scalar_move-1.c: New test. * gcc.target/riscv/rvv/base/scalar_move-2.c: New test. * gcc.target/riscv/rvv/base/scalar_move-3.c: New test. * gcc.target/riscv/rvv/base/scalar_move-4.c: New test.

[PATCH] RISC-V: Add scalar move support and fix VSETVL bugs

2023-02-24 Thread juzhe . zhong
From: Ju-Zhe Zhong gcc/ChangeLog: * config/riscv/constraints.md (Wb1): New constraint. * config/riscv/predicates.md (vector_least_significant_set_mask_operand): New predicate. (vector_broadcast_mask_operand): Ditto. * config/riscv/riscv-protos.h (enum

Re: [PATCH] rs6000: fmr gets used instead of faster xxlor [PR93571]

2023-02-24 Thread Segher Boessenkool
Hi! For future patches: please don't send patches as replies to existing threads. Just start a new thread for a new patch (series). You can mark it as [PATCH v2] in the subject, if you want. On Fri, Feb 24, 2023 at 01:41:49PM +0530, Ajit Agarwal wrote: > Here is the patch that uses xxlor

[Bug middle-end/108545] [13 Regression] ICE in install_var_field, at omp-low.cc:799 since r13-2665-g23baa717c991d77f

2023-02-24 Thread burnus at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=108545 --- Comment #3 from Tobias Burnus --- Fortran: Same issue (ICE) also with: !$omp target enter data map(to: x) Crucial is the VOLATILE attribute. * * * The following C code already gives an ICE with GCC 12, it works with GCC 11. (Either

[Bug c++/105224] [modules] g++.dg/modules/virt-2_a.C: inline key methods: c++ modules and arm aapcs clash

2023-02-24 Thread cvs-commit at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=105224 --- Comment #2 from CVS Commits --- The master branch has been updated by Alexandre Oliva : https://gcc.gnu.org/g:3d1d3ece9bc5a1baa2feb4bf231b709c097b8434 commit r13-6329-g3d1d3ece9bc5a1baa2feb4bf231b709c097b8434 Author: Alexandre Oliva

Re: C++ modules and AAPCS/ARM EABI clash on inline key methods

2023-02-24 Thread Alexandre Oliva via Gcc-patches
On Feb 24, 2023, Richard Earnshaw wrote: > Given the logic of this macro, the text should be > "!TARGET_CXX_METHOD_MAY_BE_INLINE". I was thinking just "related to that macro", but yeah, negating it makes sense. > OK with that change. Thanks, here's what I'm checking in. [PR105224] C++

[Bug c/107557] [12/13 Regression] ICE -fsanitize=undefined and VLA as argument type to a function

2023-02-24 Thread muecker at gwdg dot de via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=107557 --- Comment #7 from Martin Uecker --- Created attachment 54529 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=54529=edit new version of patch Here is another patch that does all the recursion in gimplify_type_sizes. Unfortunately, there

[committed 2/5] libstdc++: Fix conversion to/from net::ip::address_v4::bytes_type

2023-02-24 Thread Jonathan Wakely via Gcc-patches
Tested x86_64-linux. Pushed to trunk. -- >8 -- I messed up the endianness of the address_v4::bytes_type array, which should always be in network byte order. We can just use bit_cast to convert the _M_addr member to/from bytes_type. libstdc++-v3/ChangeLog: *

[committed 3/5] libstdc++: Fix members of net::ip::network_v4

2023-02-24 Thread Jonathan Wakely via Gcc-patches
Tested x86_64-linux. Pushed to trunk. -- >8 -- libstdc++-v3/ChangeLog: * include/experimental/internet (network_v4::netmask()): Avoid undefined shift. (network_v4::broadcast()): Optimize and fix for targets with uint_least32_t wider than 32 bits.

[committed 4/5] libstdc++: Make net::ip::basic_endpoint comparisons constexpr

2023-02-24 Thread Jonathan Wakely via Gcc-patches
Tested x86_64-linux. Pushed to trunk. -- >8 -- libstdc++-v3/ChangeLog: * include/experimental/internet (basic_endpoint): Add missing constexpr to comparison operators. * testsuite/experimental/net/internet/endpoint/cons.cc: New test. ---

[committed 5/5] libstdc++: Constrain net::executor constructors

2023-02-24 Thread Jonathan Wakely via Gcc-patches
Tested x86_64-linux. Pushed to trunk. -- >8 -- The TS says the arguments to these constructors shall meet the Executor requirements, so it's undefined if they don't. Constraining on a subset of those requirements won't affect valid cases, but prevents the majority of invalid cases from trying to

[committed 1/5] libstdc++: Optimize net::ip::address_v4::to_string()

2023-02-24 Thread Jonathan Wakely via Gcc-patches
Tested x86_64-linux. Pushed to trunk. -- >8 -- This is an order of magnitude faster than calling inet_ntop (and not only because we now avoid allocating a string that is one byte larger than the SSO buffer). libstdc++-v3/ChangeLog: * include/experimental/internet

[committed] libstdc++: Suppress warnings about use of deprecated std::aligned_storage

2023-02-24 Thread Jonathan Wakely via Gcc-patches
Tested powerpc64le-linux. Pushed to trunk. -- >8 -- libstdc++-v3/ChangeLog: * include/ext/aligned_buffer.h (__aligned_buffer): Add diagnostic pragmas. --- libstdc++-v3/include/ext/aligned_buffer.h | 3 +++ 1 file changed, 3 insertions(+) diff --git

[Bug c/63357] Warn for P && P and P || P (same expression used multiple times in a condition)

2023-02-24 Thread dcb314 at hotmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=63357 --- Comment #10 from David Binderman --- (In reply to Manuel López-Ibáñez from comment #9) > Please open a new PR mentioning this one. Done. See 108926.

[Bug c/108926] No warning for same expression in chain of | or & ?

2023-02-24 Thread dcb314 at hotmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=108926 --- Comment #1 from David Binderman --- (In reply to David Binderman from comment #0) > This bug is related to 53357. Sorry. 63357.

[Bug c/108926] New: No warning for same expression in chain of | or & ?

2023-02-24 Thread dcb314 at hotmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=108926 Bug ID: 108926 Summary: No warning for same expression in chain of | or & ? Product: gcc Version: 13.0 Status: UNCONFIRMED Severity: normal Priority: P3

[committed] libstdc++: Reorder dg-options before dg-do

2023-02-24 Thread Jonathan Wakely via Gcc-patches
Tested x86_64-linux. Pushed to trunk. -- >8 -- The options need to be set first, so that -std=gnu++20 is used when checking the c++20 effective target. libstdc++-v3/ChangeLog: * testsuite/std/format/arguments/lwg3810.cc: Move dg-options before dg-do. ---

[Bug middle-end/108545] [13 Regression] ICE in install_var_field, at omp-low.cc:799 since r13-2665-g23baa717c991d77f

2023-02-24 Thread burnus at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=108545 Tobias Burnus changed: What|Removed |Added CC||burnus at gcc dot gnu.org --- Comment

Re: [PATCH 2/2] Avoid default-initializing auto_vec storage, fix vec

2023-02-24 Thread Richard Biener via Gcc-patches
On Fri, 24 Feb 2023, Jakub Jelinek wrote: > On Fri, Feb 24, 2023 at 02:47:39PM +0100, Richard Biener wrote: > > * vec.h (vec::m_vecdata): Remove. > > (vec::m_vecpfx): Align as T to avoid > > changing alignment of vec and simplifying > > address. > > (vec::address): Compute as

[Bug tree-optimization/105329] [12/13 Regression] Bogus restrict warning when assigning 1-char string literal to std::string since r12-3347-g8af8abfbbace49e6

2023-02-24 Thread wielkiegie at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=105329 Gustaw Smolarczyk changed: What|Removed |Added CC||wielkiegie at gmail dot com ---

Re: [PATCH 2/2] Avoid default-initializing auto_vec storage, fix vec

2023-02-24 Thread Jakub Jelinek via Gcc-patches
On Fri, Feb 24, 2023 at 02:47:39PM +0100, Richard Biener wrote: > * vec.h (vec::m_vecdata): Remove. > (vec::m_vecpfx): Align as T to avoid > changing alignment of vec and simplifying > address. > (vec::address): Compute as this + 1. > (vec::embedded_size): Use

Re: [PATCH 1/2] Change vec<,,vl_embed>::m_vecdata refrences into address ()

2023-02-24 Thread Jakub Jelinek via Gcc-patches
On Fri, Feb 24, 2023 at 02:46:21PM +0100, Richard Biener wrote: > As preparation to remove m_vecdata in the vl_embed vector this > changes references to it into calls to address (). > > As I was here it also fixes ::contains to avoid repeated bounds > checking and the same issue in ::lower_bound

Re: [v3][PATCH 2/2] Update documentation to clarify a GCC extension (PR77650)

2023-02-24 Thread Qing Zhao via Gcc-patches
> On Feb 23, 2023, at 7:56 PM, Joseph Myers wrote: > > On Thu, 23 Feb 2023, Qing Zhao via Gcc-patches wrote: > >> But the following: >> >> struct flex1 { int length1; char data1[]; }; >> struct flex2 { int length2; char data2[]; }; >> union union_flex { struct flex1 f1; struct flex2 f2;

[PATCH 2/2] Avoid default-initializing auto_vec storage, fix vec

2023-02-24 Thread Richard Biener via Gcc-patches
The following avoids default-initializing auto_vec storage for non-POD T since that's not what the allocated storage fallback will do and it's also not expected for existing cases like auto_vec, 64> elts; which exist to optimize the allocation. It also fixes the array accesses done by vec to

[PATCH 1/2] Change vec<, , vl_embed>::m_vecdata refrences into address ()

2023-02-24 Thread Richard Biener via Gcc-patches
As preparation to remove m_vecdata in the vl_embed vector this changes references to it into calls to address (). As I was here it also fixes ::contains to avoid repeated bounds checking and the same issue in ::lower_bound which also suffers from unnecessary copying around values. *

Re: [PATCH] cgraphclones: Don't share DECL_ARGUMENTS between thunk and its artificial thunk [PR108854]

2023-02-24 Thread Jan Hubicka via Gcc-patches
> Hi! > > The following testcase ICEs on x86_64-linux with -m32. The problem is > we create an artificial thunk and because of -fPIC, ia32 and thunk > destination which doesn't bind locally can't use a mi thunk. > The ICE is because during expansion to RTL we see SSA_NAME for a PARM_DECL, > but

  1   2   >