Re: [PATCH v4 1/3] c++: Track lifetimes in constant evaluation [PR70331,PR96630,PR98675]

2023-07-21 Thread Nathaniel Shead via Gcc-patches
On Thu, Jul 20, 2023 at 10:42:29AM -0400, Jason Merrill wrote: > On 7/20/23 05:35, Nathaniel Shead wrote: > > This adds rudimentary lifetime tracking in C++ constexpr contexts, > > allowing the compiler to report errors with using values after their > > backing has gone out of scope. We don't yet

Re: [PATCH v4 3/3] c++: Improve location information in constant evaluation

2023-07-21 Thread Nathaniel Shead via Gcc-patches
On Fri, Jul 21, 2023 at 3:00 AM Jason Merrill wrote: > > On 7/20/23 05:37, Nathaniel Shead wrote: > > This patch updates 'input_location' during constant evaluation to ensure > > that errors in subexpressions that lack location information still > > provide accurate diagnostics. > > > > By itself

Re: [PATCH v4 2/3] c++: Improve constexpr error for dangling local variables [PR110619]

2023-07-21 Thread Nathaniel Shead via Gcc-patches
On Fri, Jul 21, 2023 at 05:44:51PM -0400, Jason Merrill wrote: > On 7/21/23 01:39, Nathaniel Shead wrote: > > On Thu, Jul 20, 2023 at 11:46:47AM -0400, Jason Merrill wrote: > > > On 7/20/23 05:36, Nathaniel Shead wrote: > > > > Currently, when typeck discovers that a return statement will refer to

[Bug target/110066] [RISC-V] Segment fault if compiled with -static -pg

2023-07-21 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=110066 --- Comment #6 from Andrew Pinski --- (In reply to Andrew Pinski from comment #5) > Can you try reverting r13-923-g2d546ff69455f7deadab and try GCC 13 again? That looks like the only thing that changed between GCC 12 and GCC 13 for crtbeginT.o

[Bug target/110066] [RISC-V] Segment fault if compiled with -static -pg

2023-07-21 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=110066 --- Comment #5 from Andrew Pinski --- Can you try reverting r13-923-g2d546ff69455f7deadab and try GCC 13 again?

Re: [PATCH] testsuite/110763: Ensure zero return from test

2023-07-21 Thread Jeff Law via Gcc-patches
On 7/21/23 09:16, Siddhesh Poyarekar wrote: The test deliberately reads beyond bounds to exersize ubsan and the return value may be anything, based on previous allocations. The OFF test caters for it by ANDing the return with 0, do the same for the DYN test. gcc/testsuite/ChangeLog:

Re: [PATCH] c++: fix ICE with constexpr ARRAY_REF [PR110382]

2023-07-21 Thread Jason Merrill via Gcc-patches
On 7/21/23 18:38, Marek Polacek wrote: Bootstrapped/regtested on x86_64-pc-linux-gnu, ok for trunk/13? -- >8 -- This code in cxx_eval_array_reference has been hard to get right. In r12-2304 I added some code; in r13-5693 I removed some of it. Here the problematic line is "S s = arr[0];" which

[Bug c++/110734] Attributes cannot be applied to asm statements

2023-07-21 Thread tanksherman27 at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=110734 --- Comment #4 from Julian Waters --- My mistake, I forgot to mention that it was indeed inside a function body. I can't seem to figure out what in parser.cc is causing this bug, anything on your end?

Re: [PATCH v4] Introduce attribute sym

2023-07-21 Thread Fangrui Song via Gcc-patches
On Wed, Jul 19, 2023 at 4:12 PM Alexandre Oliva via Gcc-patches wrote: > > On Jul 18, 2023, Richard Biener wrote: > > > I think the __symver__ attribute does something similar already so > > maybe use __attribute__((__sym__("foo")))? > > Cool, thanks, that will do. Regstrapped on

[Bug rtl-optimization/56590] Replace auto-inc-dec pass with generic address mode selection pass

2023-07-21 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=56590 Andrew Pinski changed: What|Removed |Added Keywords||missed-optimization

[Bug target/52628] SH Target: Inefficient shift by T bit result

2023-07-21 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=52628 Andrew Pinski changed: What|Removed |Added Severity|normal |enhancement

[Bug target/90656] Illegal operand from Fortran program WRF with mcpu=niagara3

2023-07-21 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=90656 --- Comment #1 from Andrew Pinski --- I suspect this has been fixed already via PR 91269 / PR 91854 .

[Bug rtl-optimization/85180] Infinite loop in RTL DSE optimizer

2023-07-21 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=85180 Andrew Pinski changed: What|Removed |Added Target Milestone|--- |8.0

[Bug sanitizer/90414] [Feature] Implementing HWASAN (and eventually MTE)

2023-07-21 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=90414 Andrew Pinski changed: What|Removed |Added Resolution|--- |FIXED Status|NEW

[Bug target/88556] Inline built-in sinh, cosh, tanh for -ffast-math

2023-07-21 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=88556 Andrew Pinski changed: What|Removed |Added Keywords||missed-optimization

[Bug target/88502] Inline built-in asinh, acosh, atanh for -ffast-math

2023-07-21 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=88502 Andrew Pinski changed: What|Removed |Added Severity|normal |enhancement Keywords|

Re: [PATCH] Use __builtin_trap() for abort() if inhibit_libc

2023-07-21 Thread Andrew Pinski via Gcc-patches
On Tue, Aug 17, 2021 at 1:43 AM Sebastian Huber wrote: > > abort() is used in gcc_assert() and gcc_unreachable() which is used by target > libraries such as libgcov.a. This patch changes the abort() definition under > certain conditions. If inhibit_libc is defined and abort is not already >

[Bug libgcc/110775] [12/13/14 Regression] abort define causing issues in tsystem.h

2023-07-21 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=110775 Andrew Pinski changed: What|Removed |Added Last reconfirmed||2023-07-22

[Bug libgcc/110775] New: arm-openwrt-linux-uclibcgnueabi bug

2023-07-21 Thread unlvsur at live dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=110775 Bug ID: 110775 Summary: arm-openwrt-linux-uclibcgnueabi bug Product: gcc Version: unknown Status: UNCONFIRMED Severity: normal Priority: P3 Component: libgcc

[Bug c++/110774] Ambiguous partial ordering with non-dependent function parameter type and nullptr

2023-07-21 Thread bbi5291 at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=110774 --- Comment #5 from Brian Bi --- Partial ordering is different from partial specialization. Partial ordering selects a best viable function in certain cases where two viable functions are both instantiated from templates.

[Bug c++/110774] Ambiguous partial ordering with non-dependent function parameter type and nullptr

2023-07-21 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=110774 --- Comment #4 from Andrew Pinski --- But these function declarations are not partial specializations as far as I know.

[Bug c++/110774] Ambiguous partial ordering with non-dependent function parameter type

2023-07-21 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=110774 --- Comment #3 from Andrew Pinski --- Take: ``` template struct A { typedef char* type; }; template char* f1(T, char*); // #1 template long* f1(T*, typename A::type*); // #2 char *t; char **t1; long* p0; long *p1 = f1(p0, t1); // choses #2

[Bug c++/110774] Ambiguous partial ordering with non-dependent function parameter type

2023-07-21 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=110774 --- Comment #2 from Andrew Pinski --- Actually 0 vs nullptr is the same: ``` template struct A { typedef char* type; }; template char* f1(T, char*); // #1 template long* f1(T*, typename A::type*); // #2 long* p1 = f1(p1, nullptr); // #3 ```

[Bug c++/110774] Ambiguous partial ordering with non-dependent function parameter type

2023-07-21 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=110774 --- Comment #1 from Andrew Pinski --- The literal 0 is the issue ...

[Bug c++/110774] New: Ambiguous partial ordering with non-dependent function parameter type

2023-07-21 Thread bbi5291 at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=110774 Bug ID: 110774 Summary: Ambiguous partial ordering with non-dependent function parameter type Product: gcc Version: 13.1.0 Status: UNCONFIRMED Keywords:

[pushed][LRA]: Fix sparc bootstrap after recent patch for fp elimination for avr LRA port

2023-07-21 Thread Vladimir Makarov via Gcc-patches
The following patch fixes sparc solaris bootstrap.  The explanation of the patch is in the commit message. The patch was successfully bootstrap on x86-64, aarch64, and sparc64 solaris. commit d17be8f7f36abe257a7d026dad61e5f8d14bdafc Author: Vladimir N. Makarov Date: Fri Jul 21 20:28:50

[Bug target/110772] strange code generated for bit-field access

2023-07-21 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=110772 --- Comment #4 from Andrew Pinski --- Note 10.5.0 was the last release in the GCC 10.x series, can you test out GCC 11.4.0 out?

[Bug target/110772] strange code generated for bit-field access

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

[Bug middle-end/110773] [Aarch64] crash (SIGBUS) due to atomic instructions on under-aligned memory

2023-07-21 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=110773 Andrew Pinski changed: What|Removed |Added Component|target |middle-end --- Comment #1 from Andrew

[Bug target/110772] strange code generated for bit-field access

2023-07-21 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=110772 --- Comment #2 from Andrew Pinski --- I am trying to understand what you think is wrong here? lsrsr3, r3, #7 means logical shift right by 7 and compare against 0. Also this is big-endian arm so the order of bit fields will be different

[Bug target/110773] New: [Aarch64] crash (SIGBUS) due to atomic instructions on under-aligned memory

2023-07-21 Thread scw-gcc at google dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=110773 Bug ID: 110773 Summary: [Aarch64] crash (SIGBUS) due to atomic instructions on under-aligned memory Product: gcc Version: 14.0 Status: UNCONFIRMED Severity:

Re: [PATCH 2/2 ver 5] rs6000, fix vec_replace_unaligned built-in arguments

2023-07-21 Thread Carl Love via Gcc-patches
GCC maintainers: Version 5, Fixed patch description, the first argument should be of type vector. Fixed comment in vsx.md to say "Vector and scalar extract_elt iterator/attr ". Removed a few of the changes in version 4. Specifically, reverted the names of REPLACE_ELT_V_sh back to

[PATCH 1/2 ver 2] rs6000, add argument to function find_instance

2023-07-21 Thread Carl Love via Gcc-patches
GCC maintainers: Version 2: Updated a number of formatting and spacing issues. Added the NARGS description to the header comment for function find_instance. This patch was tested on Power 8 LE/BE, Power 9 LE/BE and Power 10 LE with no regressions. The rs6000 function find_instance assumes

[Bug tree-optimization/53100] Optimize __int128 with range information

2023-07-21 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=53100 Andrew Pinski changed: What|Removed |Added Last reconfirmed|2021-08-06 00:00:00 |2023-7-21 --- Comment #5 from Andrew

[Bug c/110772] strange code generated for bit-field access

2023-07-21 Thread roland.illig at gmx dot de via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=110772 --- Comment #1 from Roland Illig --- Created attachment 55599 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=55599=edit precompiled code that works as intended

[Bug c/110772] New: strange code generated for bit-field access

2023-07-21 Thread roland.illig at gmx dot de via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=110772 Bug ID: 110772 Summary: strange code generated for bit-field access Product: gcc Version: 12.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: c

[PATCH 0/2 ver 2] rs6000, fix vec_replace_unaligned built-in arguments

2023-07-21 Thread Carl Love via Gcc-patches
GCC maintianers: Version 2. Both patches have been updated the first patch was approved with minor issues to be fixed. I will post the updated version as version 2 for completeness of the series. There were a few changes with the second patch as well. The second patch has not been approved

Re: [WIP RFC] Add support for keyword-based attributes

2023-07-21 Thread Joseph Myers
On Mon, 17 Jul 2023, Michael Matz via Gcc-patches wrote: > So, essentially you want unignorable attributes, right? Then implement > exactly that: add one new keyword "__known_attribute__" (invent a better > name, maybe :) ), semantics exactly as with __attribute__ (including using > the same

Re: [PATCH 2/2 ver 4] rs6000, fix vec_replace_unaligned built-in arguments

2023-07-21 Thread Carl Love via Gcc-patches
On Fri, 2023-07-21 at 13:04 +0800, Kewen.Lin wrote: > Hi Carl, > > on 2023/7/18 03:20, Carl Love wrote: > > GCC maintainers: > > > > Version 4, changed the new RS6000_OVLD_VEC_REPLACE_UN case > > statement > > rs6000/rs6000-c.cc. The existing REPLACE_ELT iterator name was > > changed > > to

Re: [PATCH 1/2] rs6000, add argument to function find_instance

2023-07-21 Thread Carl Love via Gcc-patches
On Fri, 2023-07-21 at 10:19 +0800, Kewen.Lin wrote: > Hi Carl, > > on 2023/7/18 03:19, Carl Love wrote: > > GCC maintainers: > > > > The rs6000 function find_instance assumes that it is called for > > built- > > ins with only two arguments. There is no checking for the actual > > number of

[Bug tree-optimization/81558] Loop not vectorized

2023-07-21 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=81558 Andrew Pinski changed: What|Removed |Added Last reconfirmed||2023-07-21

[PATCH v3 1/4] diagnostics: libcpp: Add LC_GEN linemaps to support in-memory buffers

2023-07-21 Thread Lewis Hyatt via Gcc-patches
Add a new linemap reason LC_GEN which enables encoding the location of data that was generated during compilation and does not appear in any source file. There could be many use cases, such as, for instance, referring to the content of builtin macros (not yet implemented, but an easy lift after

[PATCH v3 3/4] diagnostics: libcpp: Assign real locations to the tokens inside _Pragma strings

2023-07-21 Thread Lewis Hyatt via Gcc-patches
Currently, the tokens obtained from a destringified _Pragma string do not get assigned proper locations while they are being lexed. After the tokens have been obtained, they are reassigned the same location as the _Pragma token, which is sufficient to make things like _Pragma("GCC diagnostic

[PATCH v3 4/4] diagnostics: Support generated data locations in SARIF output

2023-07-21 Thread Lewis Hyatt via Gcc-patches
The diagnostics routines for SARIF output need to read the source code back in, so that they can generate "snippet" and "content" records, so they need to be able to cope with generated data locations. Add support for that in diagnostic-format-sarif.cc. gcc/ChangeLog: *

[PATCH v3 2/4] diagnostics: Handle generated data locations in edit_context

2023-07-21 Thread Lewis Hyatt via Gcc-patches
Class edit_context handles outputting fixit hints in diff form that could be manually or automatically applied by the user. This will not make sense for generated data locations, such as the contents of a _Pragma string, because the text to be modified does not appear in the user's input files. We

[PATCH v3 0/4] diagnostics: libcpp: Overhaul locations for _Pragma tokens

2023-07-21 Thread Lewis Hyatt via Gcc-patches
Hello- This is an update to the v2 patch series last sent in January: https://gcc.gnu.org/pipermail/gcc-patches/2023-January/609473.html While I did not receive any feedback on the v2 patches yet, they did need some rebasing on top of other recent commits to input.cc, so I thought it would be

[Bug middle-end/110764] [12/13/14 Regression] False positive -Warray-bounds warning swapping std::thread::id

2023-07-21 Thread redi at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=110764 --- Comment #9 from Jonathan Wakely --- (In reply to Andrew Pinski from comment #2) > So reading the original bug report, it is almost definitely an incorrectly > reduced testcase. Oops, yes, sorry for not noticing that before filling the bug

[Bug tree-optimization/110768] [14 Regression] Dead Code Elimination Regression since r14-2623-gc11a3aedec2

2023-07-21 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=110768 --- Comment #1 from Andrew Pinski --- 3) optimize_size logic is now different. Originally we started duplicating iff the first conditional was known to be true by ranger query, but then we used same limits as for -O2.

[Bug target/110748] RISC-V: optimize store of DF 0.0

2023-07-21 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=110748 --- Comment #13 from Andrew Pinski --- You could also look at how aarch64 implemented a similar thing (not just for -0.0 but for many other constants too): r8-2248-ga217096563e356fa03c .

[Bug target/110727] [14 Regression] gcc.target/aarch64/sve/aarch64-sve.exp has two new failures since commit 061f74c0673

2023-07-21 Thread thiago.bauermann at linaro dot org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=110727 --- Comment #2 from Thiago Jung Bauermann --- Thanks! I confirmed that I can't reproduce the problem anymore in trunk.

[PATCH] c++: fix ICE with constexpr ARRAY_REF [PR110382]

2023-07-21 Thread Marek Polacek via Gcc-patches
Bootstrapped/regtested on x86_64-pc-linux-gnu, ok for trunk/13? -- >8 -- This code in cxx_eval_array_reference has been hard to get right. In r12-2304 I added some code; in r13-5693 I removed some of it. Here the problematic line is "S s = arr[0];" which causes a crash on the assert in

[Bug middle-end/110764] [12/13/14 Regression] False positive -Warray-bounds warning swapping std::thread::id

2023-07-21 Thread maxim.yegorushkin at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=110764 --- Comment #8 from Maxim Egorushkin --- It was supposed to be one comment, but I kept clicking "save changes" button because it provided no visual feedback that the comment was being posted.

gcc-12-20230721 is now available

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

[Bug middle-end/110764] [12/13/14 Regression] False positive -Warray-bounds warning swapping std::thread::id

2023-07-21 Thread maxim.yegorushkin at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=110764 --- Comment #7 from Maxim Egorushkin --- > Can you provide the preprocessed source? Since I can't seem to reproduce it > with the above. It should be compiled with "-pthread -std=gnu++14 -O3 -Wall -Wextra -Werror" to trigger the

[Bug middle-end/110764] [12/13/14 Regression] False positive -Warray-bounds warning swapping std::thread::id

2023-07-21 Thread maxim.yegorushkin at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=110764 --- Comment #6 from Maxim Egorushkin --- > Can you provide the preprocessed source? Since I can't seem to reproduce it > with the above. It should be compiled with "-pthread -std=gnu++14 -O3 -Wall -Wextra -Werror" to trigger the

[Bug middle-end/110764] [12/13/14 Regression] False positive -Warray-bounds warning swapping std::thread::id

2023-07-21 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=110764 --- Comment #5 from Andrew Pinski --- (In reply to Maxim Egorushkin from comment #3) > The original correct reproduction: > > #include > #include > > void g(int); > > void f() { > std::vector threads(1); > threads[0] =

[Bug analyzer/109365] Double delete yields -Wanalyzer-use-after-free instead of -Wanalyzer-double-free

2023-07-21 Thread dmalcolm at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=109365 David Malcolm changed: What|Removed |Added CC||dmalcolm at gcc dot gnu.org ---

[Bug middle-end/110764] [12/13/14 Regression] False positive -Warray-bounds warning swapping std::thread::id

2023-07-21 Thread maxim.yegorushkin at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=110764 --- Comment #4 from Maxim Egorushkin --- Full context: https://github.com/max0x7ba/atomic_queue/issues/55

[Bug middle-end/110764] [12/13/14 Regression] False positive -Warray-bounds warning swapping std::thread::id

2023-07-21 Thread maxim.yegorushkin at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=110764 Maxim Egorushkin changed: What|Removed |Added CC||maxim.yegorushkin at gmail dot com

Re: [WIP RFC] analyzer: Add optional trim of the analyzer diagnostics going too deep [PR110543]

2023-07-21 Thread David Malcolm via Gcc-patches
On Fri, 2023-07-21 at 17:35 +0200, Benjamin Priour wrote: > Hi, > > Upon David's request I've joined the in progress patch to the below > email. > I hope it makes more sense now. > > Best, > Benjamin. Thanks for posting the work-in-progress patch; it makes the idea clearer. Some thoughts about

Re: [PATCH v4 2/3] c++: Improve constexpr error for dangling local variables [PR110619]

2023-07-21 Thread Jason Merrill via Gcc-patches
On 7/21/23 01:39, Nathaniel Shead wrote: On Thu, Jul 20, 2023 at 11:46:47AM -0400, Jason Merrill wrote: On 7/20/23 05:36, Nathaniel Shead wrote: Currently, when typeck discovers that a return statement will refer to a local variable it rewrites to return a null pointer. This causes the error

[Bug target/110748] RISC-V: optimize store of DF 0.0

2023-07-21 Thread vineetg at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=110748 --- Comment #12 from Vineet Gupta --- > void znd(double *d) { *d = -0.0; } > void znf(float *f) { *f = -0.0; } The rough approach I'm thinking of is to (1) Introduce a constraint for -0.0 and perhaps a predicate as well for

[Bug target/110748] RISC-V: optimize store of DF 0.0

2023-07-21 Thread vineetg at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=110748 --- Comment #11 from Vineet Gupta --- There's a variation which can be optimized as well and seems non trivial to implement Now it is the negative constant -0.0 to be stored to mem. In bit notation this has a single sign bit set thus can be

[Bug tree-optimization/110742] [14 Regression] cc1plus ICE "Floating point exception" during SLP and profiled bootstrap

2023-07-21 Thread thiago.bauermann at linaro dot org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=110742 --- Comment #15 from Thiago Jung Bauermann --- Thanks! I confirmed that I can't reproduce the problem anymore in trunk.

[PATCH] testsuite: Adjust g++.dg/gomp/pr58567.C to new compiler message

2023-07-21 Thread Thiago Jung Bauermann via Gcc-patches
Commit 92d1425ca780 "c++: redundant targ coercion for var/alias tmpls" changed the compiler error message in this testcase from : In instantiation of 'void foo() [with T = int]': :14:11: required from here :8:22: error: 'int' is not a class, struct, or union type :8:22: error: 'int' is not a

[Bug target/110748] RISC-V: optimize store of DF 0.0

2023-07-21 Thread vineetg at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=110748 --- Comment #10 from Vineet Gupta --- The fix for handling +0.0 is posted to list - really trivial. https://gcc.gnu.org/pipermail/gcc-patches/2023-July/625217.html

Please stop blocking xstyle/stylish

2023-07-21 Thread zxuiji via Gcc
Your site is far too bright and is absolutely painful to the eyes, I have a simple invert style that I expected to work on all sites and I found your site is undertaking the vile act of blocking user styles. I expect that sort of rotten design from microsoft & apple (which ironically don't), not

[PATCH] libstdc++ Add cstdarg to freestanding

2023-07-21 Thread Paul M. Bendixen via Gcc-patches
P1642 includes the header cstdarg to the freestanding implementation. This was probably left out by accident, this patch puts it in. Since this is one of the headers that go in whole cloth, there should be no further actions needed. This might be related to PR106953, but since that one touches the

[Bug middle-end/110764] [12/13/14 Regression] False positive -Warray-bounds warning swapping std::thread::id

2023-07-21 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=110764 --- Comment #2 from Andrew Pinski --- So reading the original bug report, it is almost definitely an incorrectly reduced testcase.

Re: [PATCH V3] RISC-V: Add TARGET_MIN_VLEN > 4096 check

2023-07-21 Thread Jeff Law via Gcc-patches
On 7/21/23 15:16, Andreas Schwab wrote: ../../gcc/config/riscv/riscv.cc: In function 'void riscv_option_override()': ../../gcc/config/riscv/riscv.cc:6716:7: error: misspelled term 'can not' in format; use 'cannot' instead [-Werror=format-diag] 6716 | "Current RISC-V GCC can not

[Bug middle-end/110764] [12/13/14 Regression] False positive -Warray-bounds warning swapping std::thread::id

2023-07-21 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=110764 --- Comment #1 from Andrew Pinski --- hmm, this code seems like undefined code. If I change 1 to 2 as you are accessing 2 elements via operator[], there is no warning ... The warning seems correct and even says 1 bounds is above the array

Re: [PATCH V3] RISC-V: Add TARGET_MIN_VLEN > 4096 check

2023-07-21 Thread Andreas Schwab
../../gcc/config/riscv/riscv.cc: In function 'void riscv_option_override()': ../../gcc/config/riscv/riscv.cc:6716:7: error: misspelled term 'can not' in format; use 'cannot' instead [-Werror=format-diag] 6716 | "Current RISC-V GCC can not support VLEN > 4096bit for 'V' Extension");

[Bug c++/102051] [coroutines] ICE in gimplify_var_or_parm_decl, at gimplify.c:2848

2023-07-21 Thread harris.hancock at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=102051 --- Comment #4 from Harris Hancock --- Created attachment 55597 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=55597=edit Reduced example which reproduces the ICE I'm attaching the reduced example from Vitali's first Compiler Explorer

[Bug tree-optimization/110768] [14 Regression] Dead Code Elimination Regression since r14-2623-gc11a3aedec2

2023-07-21 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=110768 Andrew Pinski changed: What|Removed |Added Keywords||missed-optimization Target

[Bug c++/102051] [coroutines] ICE in gimplify_var_or_parm_decl, at gimplify.c:2848

2023-07-21 Thread harris.hancock at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=102051 Harris Hancock changed: What|Removed |Added CC||harris.hancock at gmail dot com ---

Re: [C PATCH]: Add Walloc-type to warn about insufficient size in allocations

2023-07-21 Thread Qing Zhao via Gcc-patches
> On Jul 21, 2023, at 7:21 AM, Martin Uecker via Gcc-patches > wrote: > > > > This patch adds a warning for allocations with insufficient size > based on the "alloc_size" attribute and the type of the pointer > the result is assigned to. While it is theoretically legal to > assign to the

[Bug tree-optimization/110766] [14 Regression] ICE on valid code at -O3 on x86_64-linux-gnu: in gimple_phi_arg_def_from_edge, at gimple.h:4699

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

[Bug tree-optimization/110766] [14 Regression] ICE on valid code at -O3 on x86_64-linux-gnu: in gimple_phi_arg_def_from_edge, at gimple.h:4699

2023-07-21 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=110766 Andrew Pinski changed: What|Removed |Added Summary|ICE on valid code at -O3 on |[14 Regression] ICE on

[Bug tree-optimization/110769] ICE in adjust_loop_info_after_peeling, at tree-ssa-loop-ivcanon.cc:1023

2023-07-21 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=110769 Andrew Pinski changed: What|Removed |Added Depends on||110641 --- Comment #1 from Andrew

[Bug tree-optimization/110641] [14 Regression] ICE in adjust_loop_info_after_peeling, at tree-ssa-loop-ivcanon.cc:1023

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

Re: [PATCH 2/1] c++: passing partially inst ttp as ttp [PR110566]

2023-07-21 Thread Jason Merrill via Gcc-patches
On 7/21/23 14:34, Patrick Palka wrote: (This is a follow-up of https://gcc.gnu.org/pipermail/gcc-patches/2023-July/624951.html) Bootstrapped and regtested on x86_64-pc-linux-gnu, how does this look? -- >8 -- The previous fix doesn't work for partially instantiated ttps primarily because

[Bug target/110770] bpf: add pseudoc assembly dialect

2023-07-21 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=110770 Andrew Pinski changed: What|Removed |Added Target||bpf Severity|normal

Re: [PATCH v5 4/5] c++modules: report imported CMI files as dependencies

2023-07-21 Thread Nathan Sidwell via Gcc-patches
On 7/21/23 10:57, Ben Boeckel wrote: On Thu, Jul 20, 2023 at 17:00:32 -0400, Nathan Sidwell wrote: On 7/19/23 20:47, Ben Boeckel wrote: But it is inhibiting distributed builds because the distributing tool would need to know: - what CMIs are actually imported (here, "read the module mapper

Re: [PATCH v5 4/5] c++modules: report imported CMI files as dependencies

2023-07-21 Thread Nathan Sidwell via Gcc
On 7/21/23 10:57, Ben Boeckel wrote: On Thu, Jul 20, 2023 at 17:00:32 -0400, Nathan Sidwell wrote: On 7/19/23 20:47, Ben Boeckel wrote: But it is inhibiting distributed builds because the distributing tool would need to know: - what CMIs are actually imported (here, "read the module mapper

Re: [PATCH] analyzer: Add support of placement new and improved operator new [PR105948]

2023-07-21 Thread David Malcolm via Gcc-patches
On Thu, 2023-07-06 at 16:43 +0200, priour...@gmail.com wrote: > As per David's suggestion. > - Improved leading comment of "is_placement_new_p" > - "kf_operator_new::matches_call_types_p" now checks that arg 0 is of >   integral type and that arg 1, if any, is of pointer type. > - Changed

Re: [pushed][LRA]: Check and update frame to stack pointer elimination after stack slot allocation

2023-07-21 Thread Vladimir Makarov via Gcc-patches
On 7/20/23 16:45, Rainer Orth wrote: Hi Vladimir, The following patch is necessary for porting avr to LRA. The patch was successfully bootstrapped and tested on x86-64, aarch64, and ppc64le. There is still avr poring problem with reloading of subreg of frame pointer.  I'll address it later

[committed] Require target lra in gcc.c-torture/compile/asmgoto-6.c

2023-07-21 Thread John David Anglin
The asmgoto feature requires LRA support. Committed to trunk. Tested on hppa64-hp-hpux11.11. Dave --- Require target lra in gcc.c-torture/compile/asmgoto-6.c 2023-07-21 John David Anglin gcc/testsuite/ChangeLog: * gcc.c-torture/compile/asmgoto-6.c: Require target lra. diff --git

[Bug c++/110771] [14 regression] g++.dg/gomp/pr58567.C fails after r14-2655-g92d1425ca78040

2023-07-21 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=110771 Andrew Pinski changed: What|Removed |Added Resolution|--- |DUPLICATE

[Bug testsuite/110756] [14 Regression] commit g:92d1425ca78 causes failures in g++.dg/gomp/pr58567.C

2023-07-21 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=110756 Andrew Pinski changed: What|Removed |Added CC||seurer at gcc dot gnu.org --- Comment

[Bug tree-optimization/110669] [14 regression] ICE in gcc.dg/torture/pr105132.c since r14-2515-gb77161e60bce7b

2023-07-21 Thread cvs-commit at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=110669 --- Comment #11 from CVS Commits --- The master branch has been updated by Roger Sayle : https://gcc.gnu.org/g:cfe53af09364d94fb86013f85ef598a1d47e0657 commit r14-2721-gcfe53af09364d94fb86013f85ef598a1d47e0657 Author: Roger Sayle Date: Fri

[Bug c/110699] [12/13/14 Regression] internal compiler error: tree check: expected array_type, have error_mark in array_ref_low_bound, at tree.cc:12754

2023-07-21 Thread cvs-commit at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=110699 --- Comment #2 from CVS Commits --- The master branch has been updated by Roger Sayle : https://gcc.gnu.org/g:cfe53af09364d94fb86013f85ef598a1d47e0657 commit r14-2721-gcfe53af09364d94fb86013f85ef598a1d47e0657 Author: Roger Sayle Date: Fri

Re: [PATCH] RISC-V: optim const DF +0.0 store to mem [PR/110748]

2023-07-21 Thread Vineet Gupta
On 7/21/23 11:31, Palmer Dabbelt wrote: IIUC the pattern to emit fmv suffers from the same bug -- it's fixed in the same way, but I think we might be able to come up with a test for it: `fmv.d.x FREG, x0` would be the fastest way to generate 0.0, so maybe something like    double

[Bug c++/110771] New: [14 regression] g++.dg/gomp/pr58567.C fails after r14-2655-g92d1425ca78040

2023-07-21 Thread seurer at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=110771 Bug ID: 110771 Summary: [14 regression] g++.dg/gomp/pr58567.C fails after r14-2655-g92d1425ca78040 Product: gcc Version: 14.0 Status: UNCONFIRMED Severity:

[Bug middle-end/110757] [14 Regression] 7% parest regression on zen3 -Ofast -march=native -flto between g:4dbb3af1efe55174 (2023-07-14 00:54) and g:a5088dc3f5ef73c8 (2023-07-17 03:24)

2023-07-21 Thread jamborm at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=110757 --- Comment #2 from Martin Jambor --- The second slow-down of 4.5% was caused by r14-2546-g061f74c06735e1: 061f74c06735e1fa35b910ae0bcf01b61a74ec23 is the first bad commit commit 061f74c06735e1fa35b910ae0bcf01b61a74ec23 Author: Jan Hubicka

Re: [PATCH v3] bpf: pseudo-c assembly dialect support

2023-07-21 Thread Cupertino Miranda via Gcc-patches
>> diff --git a/gcc/doc/invoke.texi b/gcc/doc/invoke.texi >> index 3063e71c8906..b3be65d3efae 100644 >> --- a/gcc/doc/invoke.texi >> +++ b/gcc/doc/invoke.texi >> @@ -946,8 +946,8 @@ Objective-C and Objective-C++ Dialects}. >> >> @emph{eBPF Options} >> @gccoptlist{-mbig-endian -mlittle-endian

[PATCH] gcc-13/changes.html: Add and fix URL to -fstrict-flex-array option.

2023-07-21 Thread Qing Zhao via Gcc-patches
Hi, In the current GCC13 release note, the URL to the option -fstrict-flex-array is wrong (pointing to -Wstrict-flex-array). This is the change to correct the URL and also add the URL in another place where -fstrict-flex-array is mentioned. I have checked the resulting HTML file, works well.

[Bug target/110770] bpf: add pseudoc assembly dialect

2023-07-21 Thread cvs-commit at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=110770 --- Comment #1 from CVS Commits --- The master branch has been updated by Cupertino Miranda : https://gcc.gnu.org/g:77d0f9ec3809b4d2e32c36069b6b9239d301c030 commit r14-2720-g77d0f9ec3809b4d2e32c36069b6b9239d301c030 Author: Cupertino Miranda

Re: [PATCH] RISC-V: optim const DF +0.0 store to mem [PR/110748]

2023-07-21 Thread Vineet Gupta
On 7/21/23 11:31, Palmer Dabbelt wrote: On Fri, 21 Jul 2023 10:55:52 PDT (-0700), Vineet Gupta wrote: DF +0.0 is bitwise all zeros so int x0 store to mem can be used to optimize it. void zd(double *) { *d = 0.0; } currently: | fmv.d.x fa5,zero | fsd fa5,0(a0) | ret With patch | sd  

[Bug target/110770] New: bpf: add pseudoc assembly dialect

2023-07-21 Thread cupertino.miranda at oracle dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=110770 Bug ID: 110770 Summary: bpf: add pseudoc assembly dialect Product: gcc Version: unknown Status: UNCONFIRMED Severity: normal Priority: P3 Component: target

Re: [PATCH] RISC-V: optim const DF +0.0 store to mem [PR/110748]

2023-07-21 Thread Jeff Law via Gcc-patches
On 7/21/23 12:31, Palmer Dabbelt wrote: (define_expand "len_mask_gather_load"   [(match_operand:VNX1_QHSD 0 "register_operand") -   (match_operand 1 "pmode_reg_or_0_operand") +   (match_operand:P 1 "pmode_reg_or_0_operand")    (match_operand:VNX1_QHSDI 2 "register_operand")   

  1   2   3   >