[PATCH 2/2]AArch64 aarch64: Add implementation for pow2 bitmask division.

2022-06-08 Thread Tamar Christina via Gcc-patches
Hi All, This adds an implementation for the new optab for unsigned pow2 bitmask for AArch64. The implementation rewrites: x = y / (2 ^ (sizeof (y)/2)-1 into e.g. (for bytes) (x + ((x + 257) >> 8)) >> 8 where it's required that the additions be done in double the precision of x such

[PATCH 1/2]middle-end Support optimized division by pow2 bitmask

2022-06-08 Thread Tamar Christina via Gcc-patches
Hi All, In plenty of image and video processing code it's common to modify pixel values by a widening operation and then scale them back into range by dividing by 255. This patch adds an optab to allow us to emit an optimized sequence when doing an unsigned division that is equivalent to: x

Re: [RFC] Support for nonzero attribute

2022-06-08 Thread Eric Gallager via Gcc
On Wed, Jun 8, 2022 at 5:00 PM Miika wrote: > > On Wednesday, June 8th, 2022 at 8:42 PM, Eric Gallager > wrote: > > Could you take a look at bug 78155 too? There was a request to add > > something like this in that bug: > > https://gcc.gnu.org/bugzilla/show_bug.cgi?id=78155 > > (and I think

[Bug ipa/100034] missed optimization for dead code elimination at -O3 (vs. -O1, -Os, -O2)

2022-06-08 Thread luoxhu at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100034 --- Comment #2 from luoxhu at gcc dot gnu.org --- (In reply to Richard Biener from comment #1) > Looks related to PR1 - we do an IPA SRA clone but fail to inline it and > thus we end up with > > void d.isra () > { > int D.1980; > int

Re: [PATCH v4, rs6000] Implemented f[min/max]_optab by xs[min/max]dp [PR103605]

2022-06-08 Thread HAO CHEN GUI via Gcc-patches
Hi, On 8/6/2022 下午 9:24, Segher Boessenkool wrote: > But it regresses the code quality generated with -ffast-math (because > the new unspecs arent't optimised like standard rtl is). This can be > follow-up work of course -- and the best direction is to make fmin/fmax > generic, even! :-)

[Bug libstdc++/105880] eh_globals_init destructor not setting _M_init to false

2022-06-08 Thread chrisj at rtems dot org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=105880 --- Comment #10 from Chris Johns --- (In reply to Jonathan Wakely from comment #9) > Created attachment 53103 [details] > Fix lifetime bugs for non-TLS eh_globals > > Does this work? That is a great way to solve this problem given the

[Bug tree-optimization/105903] Missed optimization for __synth3way

2022-06-08 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=105903 Andrew Pinski changed: What|Removed |Added Component|c++ |tree-optimization

[Bug c++/105903] New: Missed optimization for __synth3way

2022-06-08 Thread barry.revzin at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=105903 Bug ID: 105903 Summary: Missed optimization for __synth3way Product: gcc Version: 12.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: c++

Re: [PATCH] RISC-V: Compute default ABI from -mcpu or -march

2022-06-08 Thread Andrew Pinski via Gcc-patches
On Mon, Jun 6, 2022 at 7:53 PM wangpc via Gcc-patches wrote: > > If -mcpu or -march is specified and there is no -mabi, we will calculate > default ABI from arch string provided by -march or defined in CPU info. This is 100% wrong and goes against what all other targets do. All other targets

Re: DWARF question about size of a variable

2022-06-08 Thread Eric Botcazou via Gcc
> Is there dwarf information that gives the size of a variable? I have a > test case which when run on Intel gdb can print the size of an > optimized out variable. However on PowerPC, gdb says the size > information for the variable is optimized out. Is there some DWARF > information that I can

[Bug target/105886] -mstrict-align is ignorning unalign in some cases

2022-06-08 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=105886 Andrew Pinski changed: What|Removed |Added Depends on||103100 --- Comment #2 from Andrew

[Bug target/105886] -mstrict-align is ignorning unalign in some cases

2022-06-08 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=105886 Andrew Pinski changed: What|Removed |Added Keywords||wrong-code Last reconfirmed|

[Bug c++/105885] [12/13 Regression] the address of 'template argument' will never be NULL warning

2022-06-08 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=105885 Andrew Pinski changed: What|Removed |Added Ever confirmed|0 |1 Summary|[Regression]:

[Bug c++/84920] Better handling of unmatched/ambiguous calls

2022-06-08 Thread lhyatt at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=84920 Lewis Hyatt changed: What|Removed |Added CC||lhyatt at gcc dot gnu.org --- Comment #8

[Bug c++/85577] list-initialization chooses initializer-list constructor

2022-06-08 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=85577 Andrew Pinski changed: What|Removed |Added CC||benni at stuerz dot xyz --- Comment #10

[Bug c++/105901] [C++20] Code generation bug. Well-formed Program segfaults.

2022-06-08 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=105901 Andrew Pinski changed: What|Removed |Added Status|UNCONFIRMED |RESOLVED Resolution|---

[Bug c++/105901] [C++20] Code generation bug. Well-formed Program segfaults.

2022-06-08 Thread redi at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=105901 --- Comment #5 from Jonathan Wakely --- i.e. another dup of Bug 85577

[Bug c++/105761] [11/12/13 Regression] ICE on hidden friend definition defined in base type since r11-388-gc4bff4c230c8d341

2022-06-08 Thread cvs-commit at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=105761 --- Comment #9 from CVS Commits --- The releases/gcc-11 branch has been updated by Jason Merrill : https://gcc.gnu.org/g:3e39a0a4b71dce674ee30fe71590b0152663b6d8 commit r11-10055-g3e39a0a4b71dce674ee30fe71590b0152663b6d8 Author: Jason Merrill

[Bug c++/105852] [11/12/13 Regression] ice in instantiate_decl

2022-06-08 Thread cvs-commit at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=105852 --- Comment #10 from CVS Commits --- The releases/gcc-11 branch has been updated by Jason Merrill : https://gcc.gnu.org/g:3e39a0a4b71dce674ee30fe71590b0152663b6d8 commit r11-10055-g3e39a0a4b71dce674ee30fe71590b0152663b6d8 Author: Jason

[Bug c++/105852] [11/12/13 Regression] ice in instantiate_decl

2022-06-08 Thread cvs-commit at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=105852 --- Comment #9 from CVS Commits --- The releases/gcc-12 branch has been updated by Jason Merrill : https://gcc.gnu.org/g:e057d454db4dcf48c22f75e57599f797d8e55baf commit r12-8467-ge057d454db4dcf48c22f75e57599f797d8e55baf Author: Jason Merrill

[Bug c++/105761] [11/12/13 Regression] ICE on hidden friend definition defined in base type since r11-388-gc4bff4c230c8d341

2022-06-08 Thread cvs-commit at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=105761 --- Comment #8 from CVS Commits --- The releases/gcc-12 branch has been updated by Jason Merrill : https://gcc.gnu.org/g:e057d454db4dcf48c22f75e57599f797d8e55baf commit r12-8467-ge057d454db4dcf48c22f75e57599f797d8e55baf Author: Jason Merrill

[Bug c++/105901] [C++20] Code generation bug. Well-formed Program segfaults.

2022-06-08 Thread redi at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=105901 --- Comment #4 from Jonathan Wakely --- And my bet is it's due to using braced-init instead of parentheses.

[Bug c++/105901] [C++20] Code generation bug. Well-formed Program segfaults.

2022-06-08 Thread benni at stuerz dot xyz via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=105901 --- Comment #3 from Benjamin Stürz --- Created attachment 53107 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=53107=edit Backtrace Yes seems like it.

[Bug c++/105901] [C++20] Code generation bug. Well-formed Program segfaults.

2022-06-08 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=105901 --- Comment #2 from Andrew Pinski --- my bet it is going into an infinite recusion.

[Bug middle-end/105902] New: Documentation for the RTL front-end was never added

2022-06-08 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=105902 Bug ID: 105902 Summary: Documentation for the RTL front-end was never added Product: gcc Version: 12.0 Status: UNCONFIRMED Keywords: documentation Severity: normal

[Bug c++/105901] [C++20] Code generation bug. Well-formed Program segfaults.

2022-06-08 Thread benni at stuerz dot xyz via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=105901 --- Comment #1 from Benjamin Stürz --- Created attachment 53106 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=53106=edit The preprocessed file (too large to be plain, sorry).

[Bug c++/105901] New: [C++20] Code generation bug. Well-formed Program segfaults.

2022-06-08 Thread benni at stuerz dot xyz via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=105901 Bug ID: 105901 Summary: [C++20] Code generation bug. Well-formed Program segfaults. Product: gcc Version: 12.1.0 Status: UNCONFIRMED Severity: normal

[RFC] Support for nonzero attribute

2022-06-08 Thread Miika via Gcc
On Wednesday, June 8th, 2022 at 8:42 PM, Eric Gallager wrote: > Could you take a look at bug 78155 too? There was a request to add > something like this in that bug: > https://gcc.gnu.org/bugzilla/show_bug.cgi?id=78155 > (and I think I've seen similar requests elsewhere, too) I took a look at

[Bug c++/105852] [11/12/13 Regression] ice in instantiate_decl

2022-06-08 Thread cvs-commit at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=105852 --- Comment #8 from CVS Commits --- The master branch has been updated by Jason Merrill : https://gcc.gnu.org/g:e8ed26c2ac38ab1f6ed5a627d9089a9243e06a0c commit r13-1018-ge8ed26c2ac38ab1f6ed5a627d9089a9243e06a0c Author: Jason Merrill Date:

[pushed] c++: non-templated friends [PR105852]

2022-06-08 Thread Jason Merrill via Gcc-patches
The previous patch for 105852 avoids copying DECL_TEMPLATE_INFO from a non-templated friend, but it really shouldn't have it in the first place. Tested x86_64-pc-linux-gnu, applying to trunk. PR c++/105852 gcc/cp/ChangeLog: * decl.cc (duplicate_decls): Change non-templated

[Bug c++/105852] [11/12/13 Regression] ice in instantiate_decl

2022-06-08 Thread cvs-commit at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=105852 --- Comment #7 from CVS Commits --- The master branch has been updated by Jason Merrill : https://gcc.gnu.org/g:7d87790a871482e9c5142a8e885b4a5f76d197c8 commit r13-1017-g7d87790a871482e9c5142a8e885b4a5f76d197c8 Author: Jason Merrill Date:

[Bug c++/105761] [11/12/13 Regression] ICE on hidden friend definition defined in base type since r11-388-gc4bff4c230c8d341

2022-06-08 Thread cvs-commit at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=105761 --- Comment #7 from CVS Commits --- The master branch has been updated by Jason Merrill : https://gcc.gnu.org/g:7d87790a871482e9c5142a8e885b4a5f76d197c8 commit r13-1017-g7d87790a871482e9c5142a8e885b4a5f76d197c8 Author: Jason Merrill Date:

[pushed] c++: redeclared hidden friend take 2 [PR105852]

2022-06-08 Thread Jason Merrill via Gcc-patches
My previous patch for 105761 avoided copying DECL_TEMPLATE_INFO from a friend to a later definition, but in this testcase we have first a non-friend declaration and then a definition, and we need to avoid copying in that case as well. But we do still want to set new_template_info to avoid GC

[Bug c++/96442] [10/11/12/13 Regression] ICE in tree check: expected integer_type or enumeral_type or boolean_type or real_type or fixed_point_type, have record_type in int_fits_type_p, at tree.c:8954

2022-06-08 Thread roger at nextmovesoftware dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=96442 Roger Sayle changed: What|Removed |Added Status|ASSIGNED|RESOLVED Resolution|---

DWARF question about size of a variable

2022-06-08 Thread Carl Love via Gcc
GCC developers: Is there dwarf information that gives the size of a variable? I have a test case which when run on Intel gdb can print the size of an optimized out variable. However on PowerPC, gdb says the size information for the variable is optimized out. Is there some DWARF information

[Bug middle-end/105874] [13 Regression] Incorrect codegen and ICE since g:ed6fd2aed58f2cca99f15331bf68999c0e6df370

2022-06-08 Thread cvs-commit at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=105874 --- Comment #7 from CVS Commits --- The master branch has been updated by Roger Sayle : https://gcc.gnu.org/g:b6e1373bd34aebbb512a03ea9a4e3c7acd955382 commit r13-1016-gb6e1373bd34aebbb512a03ea9a4e3c7acd955382 Author: Roger Sayle Date: Wed

[Bug middle-end/105874] [13 Regression] Incorrect codegen and ICE since g:ed6fd2aed58f2cca99f15331bf68999c0e6df370

2022-06-08 Thread ebotcazou at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=105874 Eric Botcazou changed: What|Removed |Added CC||matthias291999 at gmail dot com ---

[Bug ada/105872] GNAT Bug Box compiling gcc/ada/spark_xrefs.adb

2022-06-08 Thread ebotcazou at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=105872 Eric Botcazou changed: What|Removed |Added Status|UNCONFIRMED |RESOLVED Resolution|---

[PATCH] c++: optimize specialization of nested class templates

2022-06-08 Thread Patrick Palka via Gcc-patches
When substituting a class template specialization, tsubst_aggr_type substitutes the TYPE_CONTEXT before passing it to lookup_template_class. This appears to be unnecessary, however, because the the initial value of lookup_template_class's context parameter is unused outside of the IDENTIFIER_NODE

[Bug analyzer/105898] RFE: -fanalyzer should complain about overlapping args to memcpy and mempcpy

2022-06-08 Thread egallager at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=105898 Eric Gallager changed: What|Removed |Added CC||egallager at gcc dot gnu.org ---

[Bug analyzer/105889] RFE: -fanalyzer should complain about uses of inherently unsafe functions

2022-06-08 Thread egallager at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=105889 --- Comment #2 from Eric Gallager --- Alternate idea: have fixincludes modify headers that still declare gets() and mktemp() to annotate them with __attribute__((error)) or __attribute__((warning)), if they don't already have at least one of

Re: [RFC] Support for nonzero attribute

2022-06-08 Thread Eric Gallager via Gcc
On Sun, Jun 5, 2022 at 4:10 PM Miika via Gcc wrote: > > Based on Jakub's and Yair's comments I created a new attribute "inrange". > Inrage takes three arguments, pos min and max. > Pos being the argument position in the function, and min and max defines the > range of valid integer. Both min and

[Bug c/78155] missing warning on invalid usage of functions/macros from (isalpha et al.)

2022-06-08 Thread egallager at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=78155 --- Comment #8 from Eric Gallager --- (In reply to Martin Sebor from comment #4) > I don't really see what existing warning this might fall under, except > perhaps -Wchar-subscripts because isalpha and friend use the argument as an > index into

[Bug analyzer/105895] RFE: -fanalyzer could check constraints on calls to C standard library

2022-06-08 Thread egallager at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=105895 Eric Gallager changed: What|Removed |Added See Also||https://gcc.gnu.org/bugzill

[Bug analyzer/105887] [meta-bug] clang analyzer warnings that GCC's -fanalyzer could implement

2022-06-08 Thread egallager at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=105887 Eric Gallager changed: What|Removed |Added CC||egallager at gcc dot gnu.org

[Bug analyzer/105889] RFE: -fanalyzer should complain about uses of inherently unsafe functions

2022-06-08 Thread egallager at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=105889 Eric Gallager changed: What|Removed |Added CC||egallager at gcc dot gnu.org ---

[Bug analyzer/105890] RFE: -fanalyzer should complain about mkstemp with not enough "X"s in format string

2022-06-08 Thread egallager at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=105890 Eric Gallager changed: What|Removed |Added CC||egallager at gcc dot gnu.org Last

[Bug target/105879] DI mode constants are incorrectly loaded into registers on big-endian xtensa

2022-06-08 Thread jcmvbkbc at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=105879 jcmvbkbc at gcc dot gnu.org changed: What|Removed |Added Status|ASSIGNED|RESOLVED

[Bug target/105879] DI mode constants are incorrectly loaded into registers on big-endian xtensa

2022-06-08 Thread cvs-commit at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=105879 --- Comment #3 from CVS Commits --- The releases/gcc-11 branch has been updated by Max Filippov : https://gcc.gnu.org/g:ee9cd6d6e504cb67b27b1a5e39f965bafd62653b commit r11-10054-gee9cd6d6e504cb67b27b1a5e39f965bafd62653b Author: Max Filippov

[Bug target/105879] DI mode constants are incorrectly loaded into registers on big-endian xtensa

2022-06-08 Thread cvs-commit at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=105879 --- Comment #2 from CVS Commits --- The releases/gcc-12 branch has been updated by Max Filippov : https://gcc.gnu.org/g:777a80af43eebb7506937cf04b54f17c4fce2b8e commit r12-8466-g777a80af43eebb7506937cf04b54f17c4fce2b8e Author: Max Filippov

[Bug libstdc++/105671] [11 Regression] Unexplained "undefined reference" error

2022-06-08 Thread redi at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=105671 Jonathan Wakely changed: What|Removed |Added Summary|[11/12 Regression] |[11 Regression] Unexplained

[Bug libstdc++/105681] [12 Regression] libstdc++-v3 fails to build on msp430

2022-06-08 Thread redi at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=105681 Jonathan Wakely changed: What|Removed |Added Status|ASSIGNED|RESOLVED Resolution|---

[Bug middle-end/101836] __builtin_object_size(P->M, 1) where M is an array and the last member of a struct fails

2022-06-08 Thread qinzhao at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=101836 --- Comment #14 from qinzhao at gcc dot gnu.org --- (In reply to Kees Cook from comment #13) > Maybe the enum needs to also be expanded so that [0] can be distinguished > from []? I believe that the IR for real flexible array [] is different

[COMMITTED] gcc: xtensa: fix PR target/105879

2022-06-08 Thread Max Filippov via Gcc-patches
split_double operates with the 'word that comes first in memory in the target' terminology, while gen_lowpart operates with the 'value representing some low-order bits of X' terminology. They are not equivalent and must be dealt with differently on little- and big-endian targets. gcc/ PR

[Bug sanitizer/105817] outline kernel-address sanitizer doesn't save caller-saved registers properly on AArch64

2022-06-08 Thread rearnsha at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=105817 --- Comment #1 from Richard Earnshaw --- The GCC manual says register int *p1 asm ("r0") = …; register int *p2 asm ("r1") = …; register int *result asm ("r0"); asm ("sysint" : "=r" (result) : "0" (p1), "r" (p2)); Warning: In the above

[Bug libstdc++/105671] [11/12 Regression] Unexplained "undefined reference" error

2022-06-08 Thread cvs-commit at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=105671 --- Comment #7 from CVS Commits --- The releases/gcc-12 branch has been updated by Jonathan Wakely : https://gcc.gnu.org/g:d47c4f0f1da0aa84097878b82e100d08deb6d950 commit r12-8465-gd47c4f0f1da0aa84097878b82e100d08deb6d950 Author: Jonathan

[Bug libstdc++/105681] [12 Regression] libstdc++-v3 fails to build on msp430

2022-06-08 Thread cvs-commit at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=105681 --- Comment #14 from CVS Commits --- The releases/gcc-12 branch has been updated by Jonathan Wakely : https://gcc.gnu.org/g:ca1ab44ad8a61e2b916cf4173fe452b78ed6 commit r12-8464-gca1ab44ad8a61e2b916cf4173fe452b78ed6 Author: Jonathan

[Bug target/105879] DI mode constants are incorrectly loaded into registers on big-endian xtensa

2022-06-08 Thread cvs-commit at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=105879 --- Comment #1 from CVS Commits --- The master branch has been updated by Max Filippov : https://gcc.gnu.org/g:e94c6dbfb57a862dd8a8685eabc4886ad1aaea25 commit r13-1015-ge94c6dbfb57a862dd8a8685eabc4886ad1aaea25 Author: Max Filippov Date:

c++: Reimplement static init/fini generation

2022-06-08 Thread Nathan Sidwell
Currently we generate static init/fini code by generating a set of functions taking an 'initp' bool and an unsigned priority. (There can be more than one, as we repeat the end-of-compile loop.) We then generate a set of real init or fini functions for each needed prioroty, calling the previous

[Bug middle-end/105874] [13 Regression] Incorrect codegen and ICE since g:ed6fd2aed58f2cca99f15331bf68999c0e6df370

2022-06-08 Thread tnfchris at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=105874 --- Comment #5 from Tamar Christina --- Ah, great, Thanks Roger! I did end up reducing it to: template class b { public: int c[a]; int operator[](long d) const { return c[d]; } }; class board { bool is_eye(int, int); static const

[Bug c++/88174] Make __real__ += __val usable in constexpr context.

2022-06-08 Thread jakub at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=88174 Jakub Jelinek changed: What|Removed |Added Status|NEW |ASSIGNED CC|

[Bug middle-end/101836] __builtin_object_size(P->M, 1) where M is an array and the last member of a struct fails

2022-06-08 Thread kees at outflux dot net via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=101836 --- Comment #13 from Kees Cook --- Maybe the enum needs to also be expanded so that [0] can be distinguished from []?

[Bug analyzer/99669] RFE: detect division by zero in analyzer

2022-06-08 Thread dmalcolm at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=99669 David Malcolm changed: What|Removed |Added Blocks||105887 --- Comment #2 from David

[Bug analyzer/105900] New: RFE: -fanalyzer could check malloc sizes when casting the result to a pointer

2022-06-08 Thread dmalcolm at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=105900 Bug ID: 105900 Summary: RFE: -fanalyzer could check malloc sizes when casting the result to a pointer Product: gcc Version: 12.0 Status: UNCONFIRMED Severity:

[RFC] Support for nonzero attribute (Miika)

2022-06-08 Thread Yair Lenga via Gcc
Miika - lot of thanks. In .y mind, this is a major improvement. Also, want to suggest taking a nother look into the semnatic. I agreed inrange should include the low and high, similar to the gcc extensions) .. operator, the SQL in operator, perl .. operator, etc. There is another use common use

Re: [PATCH v2 01/11] OpenMP 5.0: Clause ordering for OpenMP 5.0 (topological sorting by base pointer)

2022-06-08 Thread Julian Brown
Hi Jakub, Thanks for review! On Tue, 24 May 2022 15:03:07 +0200 Jakub Jelinek via Fortran wrote: > On Fri, Mar 18, 2022 at 09:24:51AM -0700, Julian Brown wrote: > > 2021-11-23 Julian Brown > > > > gcc/ > > * gimplify.c (is_or_contains_p, > > omp_target_reorder_clauses): Delete

[Bug analyzer/105899] New: RFE: -fanalyzer could complain about misuses of standard C string APIs

2022-06-08 Thread dmalcolm at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=105899 Bug ID: 105899 Summary: RFE: -fanalyzer could complain about misuses of standard C string APIs Product: gcc Version: 12.0 Status: UNCONFIRMED Severity: normal

Re: [PATCH 1/3] Disable generating store vector pair.

2022-06-08 Thread Peter Bergner via Gcc-patches
On 6/7/22 10:16 PM, Michael Meissner wrote: > Otherwise it is like the mess with -mpower8-fusion, where going from power8 to > power9 we have to clear the fusion flag. If store vector pair is a postive > flag, then it isn't set in power10 flags, but it might be set in next cpu > flags. But if it

[Bug analyzer/105898] New: RFE: -fanalyzer should complain about overlapping args to memcpy and mempcpy

2022-06-08 Thread dmalcolm at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=105898 Bug ID: 105898 Summary: RFE: -fanalyzer should complain about overlapping args to memcpy and mempcpy Product: gcc Version: 12.0 Status: UNCONFIRMED Severity:

[Bug analyzer/105897] New: RFE: -fanalyzer could complain about misuses of pthread API

2022-06-08 Thread dmalcolm at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=105897 Bug ID: 105897 Summary: RFE: -fanalyzer could complain about misuses of pthread API Product: gcc Version: 12.0 Status: UNCONFIRMED Severity: normal

[Bug analyzer/105896] New: RFE: -fanalyzer could complain about improper uses of "chroot"

2022-06-08 Thread dmalcolm at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=105896 Bug ID: 105896 Summary: RFE: -fanalyzer could complain about improper uses of "chroot" Product: gcc Version: 12.0 Status: UNCONFIRMED Severity: normal

[Bug analyzer/105895] New: RFE: -fanalyzer could check constraints on calls to C standard library

2022-06-08 Thread dmalcolm at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=105895 Bug ID: 105895 Summary: RFE: -fanalyzer could check constraints on calls to C standard library Product: gcc Version: 12.0 Status: UNCONFIRMED Severity: normal

[PATCH 2/2][AArch32] Fix 128-bit sequential consistency atomic operations.

2022-06-08 Thread Tamar Christina via Gcc-patches
Hi All, Similar to AArch64 the Arm implementation of 128-bit atomics is broken. For 128-bit atomics we rely on pthread barriers to correct guard the address in the pointer to get correct memory ordering. However for 128-bit atomics the address under the lock is different from the original

[PATCH 1/2]AArch64 Fix 128-bit sequential consistency atomic operations.

2022-06-08 Thread Tamar Christina via Gcc-patches
Hi All, The AArch64 implementation of 128-bit atomics is broken. For 128-bit atomics we rely on pthread barriers to correct guard the address in the pointer to get correct memory ordering. However for 128-bit atomics the address under the lock is different from the original pointer. This means

Re: [PATCH 1/3] Disable generating store vector pair.

2022-06-08 Thread will schmidt via Gcc-patches
On Tue, 2022-06-07 at 23:16 -0400, Michael Meissner wrote: > On Tue, Jun 07, 2022 at 07:59:34PM -0500, Peter Bergner wrote: > > On 6/7/22 4:24 PM, Segher Boessenkool wrote: > > > On Tue, Jun 07, 2022 at 04:17:04PM -0500, Peter Bergner wrote: > > > > I think I mentioned this offline, but I'd prefer

[Bug analyzer/105894] New: RFE: -fanalyzer could complain about misuse of functions that return pointers to a static buffer

2022-06-08 Thread dmalcolm at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=105894 Bug ID: 105894 Summary: RFE: -fanalyzer could complain about misuse of functions that return pointers to a static buffer Product: gcc Version: 12.0 Status: UNCONFIRMED

[Bug analyzer/105893] New: RFE: -fanalyzer could check putenv calls

2022-06-08 Thread dmalcolm at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=105893 Bug ID: 105893 Summary: RFE: -fanalyzer could check putenv calls Product: gcc Version: 12.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component:

[Bug analyzer/105892] New: RFE: -fanalyzer could complain about pointer subtraction of pointers to different memory chunks

2022-06-08 Thread dmalcolm at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=105892 Bug ID: 105892 Summary: RFE: -fanalyzer could complain about pointer subtraction of pointers to different memory chunks Product: gcc Version: 12.0 Status: UNCONFIRMED

[Bug analyzer/105891] New: RFE: -fanalyzer could complain about pointer arithmetic on non-arrays

2022-06-08 Thread dmalcolm at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=105891 Bug ID: 105891 Summary: RFE: -fanalyzer could complain about pointer arithmetic on non-arrays Product: gcc Version: 12.0 Status: UNCONFIRMED Severity: normal

[Bug analyzer/105890] New: RFE: -fanalyzer should complain about mkstemp with not enough "X"s in format string

2022-06-08 Thread dmalcolm at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=105890 Bug ID: 105890 Summary: RFE: -fanalyzer should complain about mkstemp with not enough "X"s in format string Product: gcc Version: 12.0 Status: UNCONFIRMED

Re: [PATCH]AArch64 relax predicate on load structure load instructions

2022-06-08 Thread Richard Sandiford via Gcc-patches
Tamar Christina writes: >> -Original Message- >> From: Richard Sandiford >> Sent: Wednesday, June 8, 2022 11:31 AM >> To: Tamar Christina >> Cc: gcc-patches@gcc.gnu.org; nd ; Richard Earnshaw >> ; Marcus Shawcroft >> ; Kyrylo Tkachov >> Subject: Re: [PATCH]AArch64 relax predicate on

[Bug analyzer/105889] New: RFE: -fanalyzer should complain about uses of inherently unsafe functions

2022-06-08 Thread dmalcolm at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=105889 Bug ID: 105889 Summary: RFE: -fanalyzer should complain about uses of inherently unsafe functions Product: gcc Version: 12.0 Status: UNCONFIRMED Severity:

Updated invitation with note: Rust GCC community call @ Fri 10 Jun 2022 10am - 10:30am (BST) (gcc-rust@gcc.gnu.org)

2022-06-08 Thread philip . herron
BEGIN:VCALENDAR PRODID:-//Google Inc//Google Calendar 70.9054//EN VERSION:2.0 CALSCALE:GREGORIAN METHOD:REQUEST BEGIN:VEVENT DTSTART:20220610T09Z DTEND:20220610T093000Z DTSTAMP:20220608T143049Z ORGANIZER;CN=philip.her...@embecosm.com:mailto:philip.her...@embecosm.com

[Bug analyzer/105888] New: RFE: -fanalyzer should complain when an on-stack address escapes/outlives the function

2022-06-08 Thread dmalcolm at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=105888 Bug ID: 105888 Summary: RFE: -fanalyzer should complain when an on-stack address escapes/outlives the function Product: gcc Version: 12.0 Status: UNCONFIRMED

[Bug analyzer/105887] New: RFE: clang analyzer warnings that GCC's -fanalyzer could implement

2022-06-08 Thread dmalcolm at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=105887 Bug ID: 105887 Summary: RFE: clang analyzer warnings that GCC's -fanalyzer could implement Product: gcc Version: 12.0 Status: UNCONFIRMED Keywords: meta-bug

Re: [PATCH] PR middle-end/105874: Use EXPAND_MEMORY to fix ada bootstrap.

2022-06-08 Thread Eric Botcazou via Gcc-patches
> The fix is to ensure that we call expand_expr with EXPAND_MEMORY > when processing the VAR_DECL's returned by get_inner_reference. > > This patch has been tested on x86_64-pc-linux-gnu with make bootstrap > and make -k check (with no new failures), but also with > --enable-languages="ada" where

[Bug middle-end/101836] __builtin_object_size(P->M, 1) where M is an array and the last member of a struct fails

2022-06-08 Thread qinzhao at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=101836 --- Comment #12 from qinzhao at gcc dot gnu.org --- In the current tree-object-size.cc, "addr_object_size", it's clearly state the following: 607 /* For >fld, compute object size only if fld isn't the last 608

[Bug target/105782] [sparc64] Emission of questionable movxtod/movdtox with -mvis3

2022-06-08 Thread koachan+gccbugs at protonmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=105782 --- Comment #4 from Koakuma --- (In reply to Eric Botcazou from comment #3) > I guess that, under high register pressure, the register allocator rather > uses floating-point registers than spllling values on the stack. I suppose so? However, I

RE: [PATCH]AArch64 relax predicate on load structure load instructions

2022-06-08 Thread Tamar Christina via Gcc-patches
> -Original Message- > From: Richard Sandiford > Sent: Wednesday, June 8, 2022 11:31 AM > To: Tamar Christina > Cc: gcc-patches@gcc.gnu.org; nd ; Richard Earnshaw > ; Marcus Shawcroft > ; Kyrylo Tkachov > Subject: Re: [PATCH]AArch64 relax predicate on load structure load > instructions

Re: [PATCH v4, rs6000] Implemented f[min/max]_optab by xs[min/max]dp [PR103605]

2022-06-08 Thread Segher Boessenkool
On Wed, Jun 08, 2022 at 11:28:11AM +0800, HAO CHEN GUI wrote: > This patch implements optab f[min/max]_optab by xs[min/max]dp on rs6000. > Tests show that outputs of xs[min/max]dp are consistent with the standard > of C99 fmin/max. But it regresses the code quality generated with -ffast-math

Re: aarch64: Fix bitfield alignment in param passing [PR105549]

2022-06-08 Thread Richard Sandiford via Gcc-patches
Christophe Lyon writes: > On 6/7/22 19:44, Richard Sandiford wrote: >> Christophe Lyon via Gcc-patches writes: >>> While working on enabling DFP for AArch64, I noticed new failures in >>> gcc.dg/compat/struct-layout-1.exp (t028) which were not actually >>> caused by DFP types handling. These

[Bug middle-end/105874] [13 Regression] Incorrect codegen and ICE since g:ed6fd2aed58f2cca99f15331bf68999c0e6df370

2022-06-08 Thread roger at nextmovesoftware dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=105874 Roger Sayle changed: What|Removed |Added Status|NEW |ASSIGNED --- Comment #4 from Roger Sayle

[PATCH] PR middle-end/105874: Use EXPAND_MEMORY to fix ada bootstrap.

2022-06-08 Thread Roger Sayle
Many thanks to Tamar Christina for filing PR middle-end/105874 indicating that SPECcpu 2017's Leela is failing on x86_64 due to a miscompilation of FastBoard::is_eye. This function is much smaller and easier to work with than my previous hunt for the cause of the Ada bootstrap failures due to

[Bug target/105773] [Aarch64] Failure to optimize and+cmp to tst

2022-06-08 Thread rearnsha at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=105773 Richard Earnshaw changed: What|Removed |Added Priority|P3 |P4 Severity|normal

[Bug target/105773] [Aarch64] Failure to optimize and+cmp to tst

2022-06-08 Thread rearnsha at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=105773 Richard Earnshaw changed: What|Removed |Added Last reconfirmed||2022-06-08

Re: GCC Rust git branch

2022-06-08 Thread Thomas Schwinge
Hi! This is about GCC/Rust, , now also having a presence in GCC upstream Git sources; see also "GCC Git Branch". On 2021-05-24T16:24:38+, Joseph Myers wrote: > On Mon, 24 May 2021, Philip Herron wrote: > >> remote:

Re: GCC Rust git branch

2022-06-08 Thread Thomas Schwinge
Hi! This is about GCC/Rust, , now also having a presence in GCC upstream Git sources; see also "GCC Git Branch". On 2021-05-24T16:24:38+, Joseph Myers wrote: > On Mon, 24 May 2021, Philip Herron wrote: > >> remote:

Re: GCC Rust git branch

2022-06-08 Thread Thomas Schwinge
Hi! This is about GCC/Rust, , now also having a presence in GCC upstream Git sources; see also "GCC Git Branch". On 2021-05-24T16:24:38+, Joseph Myers wrote: > On Mon, 24 May 2021, Philip Herron wrote: > >> remote:

Re: aarch64: Fix bitfield alignment in param passing [PR105549]

2022-06-08 Thread Christophe Lyon via Gcc-patches
On 6/7/22 19:44, Richard Sandiford wrote: Christophe Lyon via Gcc-patches writes: While working on enabling DFP for AArch64, I noticed new failures in gcc.dg/compat/struct-layout-1.exp (t028) which were not actually caused by DFP types handling. These tests are generated during 'make check'

[Bug c/105886] New: GCC optimizes structs with FP registers but ignores alignment in this case

2022-06-08 Thread keven.kloeckner at siemens dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=105886 Bug ID: 105886 Summary: GCC optimizes structs with FP registers but ignores alignment in this case Product: gcc Version: 11.2.0 Status: UNCONFIRMED Severity:

  1   2   >