Re: [PATCH] forwprop: Don't add uses to dce list if debug statement [PR116156]

2024-08-01 Thread Richard Biener
On Thu, Aug 1, 2024 at 10:40 PM Andrew Pinski wrote: > > The problem here is that when forwprop does a copy prop, into a statement, > we mark the uses of that statement as possibly need to be removed. But it just > happened that statement was a debug statement, there will be a difference when > co

[PATCH] i386: Fix comment/naming for APX NDD constraints

2024-08-01 Thread Kong, Lingling
Bootstrapped and regtested on x86_64-pc-linux-gnu{-m32,}. Ok for trunk? gcc/ChangeLog: * config/i386/constraints.md: Fixed the comment/naming for je/jM/jO. * config/i386/predicates.md (apx_ndd_memory_operand): Renamed and fixed the comment. (apx_evex_memory

[PATCH 9/9] Update tests to work with architecture flags changes.

2024-08-01 Thread Michael Meissner
Two tests used -mvsx to raise the processor level to at least power7. These tests were rewritten to add cpu=power7 support. I have built both big endian and little endian bootstrap compilers and there were no regressions. In addition, I constructed a test case that used every archiecture define

[PATCH 8/9] Change TARGET_MODULO to TARGET_POWER9

2024-08-01 Thread Michael Meissner
As part of the architecture flags patches, this patch changes the use of TARGET_MODULO to TARGET_POWER9. The modulo instructions were added in power9 (ISA 3.0). Note, I did not change the uses of TARGET_MODULO where it was explicitly generating different code if the machine had a modulo instruct

[PATCH 7/9] Change TARGET_POPCNTD to TARGET_POWER7

2024-08-01 Thread Michael Meissner
As part of the architecture flags patches, this patch changes the use of TARGET_POPCNTD to TARGET_POWER7. The POPCNTD instruction was added in power7 (ISA 2.06). I have built both big endian and little endian bootstrap compilers and there were no regressions. In addition, I constructed a test ca

[PATCH 6/9] Change TARGET_CMPB to TARGET_POWER6

2024-08-01 Thread Michael Meissner
As part of the architecture flags patches, this patch changes the use of TARGET_FPRND to TARGET_POWER6. The CMPB instruction was added in power6 (ISA 2.05). I have built both big endian and little endian bootstrap compilers and there were no regressions. In addition, I constructed a test case th

[PATCH 5/9] Change TARGET_FPRND to TARGET_POWER5X

2024-08-01 Thread Michael Meissner
As part of the architecture flags patches, this patch changes the use of TARGET_FPRND to TARGET_POWER5X. The FPRND instruction was added in power5+. I have built both big endian and little endian bootstrap compilers and there were no regressions. In addition, I constructed a test case that used

[PATCH 4/9] Change TARGET_POPCNTB to TARGET_POWER5

2024-08-01 Thread Michael Meissner
As part of the architecture flags patches, this patch changes the use of TARGET_POPCNTB to TARGET_POWER5. The POPCNTB instruction was added in ISA 2.02 (power5). I have built both big endian and little endian bootstrap compilers and there were no regressions. In addition, I constructed a test ca

[PATCH 3/9] Do not allow -mvsx to boost processor to power7.

2024-08-01 Thread Michael Meissner
This patch restructures the code so that -mvsx for example will not silently convert the processor to power7. The user must now use -mcpu=power7 or higher. This means if the user does -mvsx and the default processor does not have VSX support, it will be an error. I have built both big endian and

[PATCH 2/9] Use architecture flags for defining _ARCH_PWR macros.s

2024-08-01 Thread Michael Meissner
For the newer architectures, this patch changes GCC to define the _ARCH_PWR macros using the new architecture flags instead of relying on isa options like -mpower10. The -mpower8-internal, -mpower10, and -mpower11 options were removed. The -mpower11 option was removed completely, since it was jus

[PATCH 1/9] Add rs6000 architecture masks.

2024-08-01 Thread Michael Meissner
This patch begins the journey to move architecture bits that are not user ISA options from rs6000_isa_flags to a new targt variable rs6000_arch_flags. The intention is to remove switches that are currently isa options, but the user should not be using this particular option. For example, we want u

[PATCH 0/9] Adding PowerPC architecture flags in addition to ISA flags

2024-08-01 Thread Michael Meissner
I wrote these patches after submitting the power11 patches. For a long time, one of the issues with the PowerPC port has been internally we use an ISA option to denote a specific power architecture level. For example: -mpopcntb means the target is at least a power5 system -

Re: [PATCH] RISC-V: Add --with-cmodel configure option

2024-08-01 Thread Hau Hsu
Oh sorry. Sent v2 and replaced compact code model with large code model. Hau Hsu > On Aug 2, 2024, at 12:32 PM, Kito Cheng wrote: > > compact code mode is our downstream stuffs, so...it should drop it from the > patch > > > Hau Hsu mailto:hau@sifive.com>> 於 2024年8月2日 週五 12:17 > 寫道

[PATCH v2] RISC-V: Add --with-cmodel configure option

2024-08-01 Thread Hau Hsu
Sometimes we want to use default cmodel other than medlow. Add a GCC configure option for that. gcc/ChangeLog: * config.gcc (riscv*-*-*): Add support for --with-cmodel configure option. * config/riscv/riscv.h (TARGET_RISCV_DEFAULT_CMODEL): Define default cmodel. * configure: Regenerat

Re: [PATCH] RISC-V: Add --with-cmodel configure option

2024-08-01 Thread Kito Cheng
compact code mode is our downstream stuffs, so...it should drop it from the patch Hau Hsu 於 2024年8月2日 週五 12:17 寫道: > Sometimes we want to use default cmodel other than medlow. Add a GCC > configure option for that. > > gcc/ChangeLog: > > * config.gcc (riscv*-*-*): Add support for --with-cmod

[PATCH] RISC-V: Improve length attributes for atomic insn sequences

2024-08-01 Thread Patrick O'Neill
gcc/ChangeLog: * config/riscv/sync-rvwmo.md: Add conditional length attributes. * config/riscv/sync-ztso.md: Ditto. * config/riscv/sync.md: Fix incorrect insn length attributes and reformat existing conditional checks. Signed-off-by: Patrick O'Neill --- gcc/confi

[PATCH] RISC-V: Add --with-cmodel configure option

2024-08-01 Thread Hau Hsu
Sometimes we want to use default cmodel other than medlow. Add a GCC configure option for that. gcc/ChangeLog: * config.gcc (riscv*-*-*): Add support for --with-cmodel configure option. * config/riscv/riscv.h (TARGET_RISCV_DEFAULT_CMODEL): Define default cmodel. * configure: Regenerat

RE: [PATCH 0/1] Initial support for AVX10.2

2024-08-01 Thread Jiang, Haochen
> -Original Message- > From: Andi Kleen > Sent: Friday, August 2, 2024 2:04 AM > To: Jiang, Haochen > Cc: gcc-patches@gcc.gnu.org; Liu, Hongtao ; > ubiz...@gmail.com > Subject: Re: [PATCH 0/1] Initial support for AVX10.2 > > Haochen Jiang writes: > > > Hi all, > > > > AVX10.2 tech deta

[PATCH] genemit: Fix handling of explicit parallels for clobbers [PR116058]

2024-08-01 Thread Andrew Pinski
In a define_insn, you could use either an explicit parallel for the insns or genrecog/genemit will add one for you. The problem when genemit is processing the pattern for clobbers (to create the function add_clobbers), genemit hadn't add the implicit parallel yet but at the same time forgot to igno

Re:[pushed] [PATCH 0/1] LoongArch: Remove gawk extension from a generator script.

2024-08-01 Thread Lulu Cheng
Pushed to r15-2660. 在 2024/7/23 上午10:04, Yang Yujie 写道: Builds for the LoongArch target fail if the system "awk" is not "gawk". This patch removes this unnecessary requirement. Thanks to Jan-Benedict Glaw for finding and reporting this issue. Yang Yujie (1): LoongArch: Remove gawk extensio

Re: [committed] libstdc++: Remove unnecessary uses of

2024-08-01 Thread Andrew Pinski
On Thu, Aug 1, 2024 at 2:14 PM Jonathan Wakely wrote: > > This will probably need a gcc-15/porting_to.html entry at some point. > Every time we remove transitive includes of it breaks > somebody! Yes including testcases, libstdc++-prettyprinters/shared_ptr.cc does not compile due to this change

[PATCH v2] LoongArch: Use iorn and andn standard pattern names.

2024-08-01 Thread Lulu Cheng
R15-1890 introduced new optabs iorc and andc, and its corresponding internal functions BIT_{ANDC,IORC}, and if targets defines such optabs for vector modes. And in r15-2258 the iorc and andc were renamed to iorn and andn. So we changed the andn and iorn implementation templates to the standard tem

[PATCH v2] LoongArch: Use iorn and andn standard pattern names.

2024-08-01 Thread Lulu Cheng
R15-1890 introduced new optabs iorc and andc, and its corresponding internal functions BIT_{ANDC,IORC}, and if targets defines such optabs for vector modes. And in r15-2258 the iorc and andc were renamed to iorn and andn. So we changed the andn and iorn implementation templates to the standard tem

RE: [PATCH v2] aarch64: Improve Advanced SIMD popcount expansion by using SVE [PR113860]

2024-08-01 Thread Pengxuan Zheng (QUIC)
Pushed as r15-2659-ge4b8db26de352. Pengxuan > This patch improves the Advanced SIMD popcount expansion by using SVE if > available. > > For example, GCC currently generates the following code sequence for V2DI: > cnt v31.16b, v31.16b > uaddlp v31.8h, v31.16b > uaddlp v31.4s, v31.8h >

Re: [PATCH] testsuite: Adjust fam-in-union-alone-in-struct-2.c to support BE [PR116148]

2024-08-01 Thread Kewen.Lin
on 2024/8/1 15:04, Richard Biener wrote: > On Wed, Jul 31, 2024 at 9:00 PM Qing Zhao wrote: >> >> Hi, Kewen, >> >> Thanks a lot for fixing this testing case issue. >> Yes, the change LGTM though I can’t approve it. > > OK. Thanks to all, pushed as r15-2658. BR, Kewen > > Richard. > >> Qing >

Re: [wwwdocs] OpenMP: gcc-15/changes.html - minor update / projects/gomp - link to TR13

2024-08-01 Thread Gerald Pfeifer
On Thu, 1 Aug 2024, Tobias Burnus wrote: > Comments, thoughts, remarks before I commit it? Looks good to me. And nice you start documenting things early (as usual I should say). Gerald

Re: [PATCH] c++/coroutines: fix actor cases not being added to the current switch [PR109867]

2024-08-01 Thread Arsen Arsenović
Jason Merrill writes: > On 8/1/24 12:48 PM, Arsen Arsenović wrote: >> Tested on x86_64-pc-linux-gnu, no regression. >> OK for trunk? >> TIA, have a lovely day. >> -- >8 -- >> Previously, we were building and inserting case_labels manually, which >> lead to them not being added int

[PATCH] libstdc++: Fix std::allocator_traits::construct constraints [PR108619]

2024-08-01 Thread Jonathan Wakely
The latest in the series of "rewrite all our enable_if-based overload sets using concepts!" improvements. A smaller change will be needed on the branches, this is just for trunk. Tested x86_64-linux. -- >8 -- Using std::is_constructible in the constraints introduces a spurious dependency on the

[PATCH] libstdc++: Preserve signbit of nan when converting float to double [PR113578]

2024-08-01 Thread Jonathan Wakely
It makes me a big sad that we need to do this, but the _S_cast_flt function should get optimized away completely on targets where it doesn't need to do anything special. As far as I know only RISC-V needs special handling, but we could extend it to other targets if needed. Tested x86_64-linux. -

[PATCH] libstdc++: Optimize __try_use_facet for const types

2024-08-01 Thread Jonathan Wakely
Tested x86_64-linux. -- >8 -- LWG 436 confirmed that const-qualified types are valid arguments for Facet template parameters, but volatile-qualified types are not. libstdc++-v3/ChangeLog: * include/bits/locale_classes.h: * include/bits/locale_classes.tcc: --- libstdc++-v3/inclu

[PATCH] libstdc++: Use strlen for std::char_traits::length [PR102958]

2024-08-01 Thread Jonathan Wakely
Tested x86_64-linux. -- >8 -- libstdc++-v3/ChangeLog: PR tree-optimization/102958 * include/bits/char_traits.h (char_traits::length): Use strlen. --- libstdc++-v3/include/bits/char_traits.h | 5 + 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/libstdc++

[PATCH] libstdc++: Check ios::uppercase for ios::fixed floating-point output [PR114862]

2024-08-01 Thread Jonathan Wakely
Tested x86_64-linux. -- >8 -- This is LWG 4084 which I filed recently. LWG seems to support making the change, so that std::num_put can use the %F format for floating-point numbers. libstdc++-v3/ChangeLog: PR libstdc++/114862 * src/c++98/locale_facets.cc (__num_base::_S_format_f

[PATCH] libstdc++: Only use std::time_put in std::format for non-C locales

2024-08-01 Thread Jonathan Wakely
Tested x86_64-linux and sparc-solaris. I really need to add some tests that use modified formats like %EY and %OS for locales that actually have special forms for those. We don't have any such tests now, and with this change most of the _M_locale_fmt code paths are no longer exercised at all. So b

Re: [PATCH] c++: fix -Wdangling-reference false positive [PR115987]

2024-08-01 Thread Jason Merrill
On 8/1/24 4:19 PM, Marek Polacek wrote: Bootstrapped/regtested on x86_64-pc-linux-gnu, ok for trunk? -- >8 -- This fixes another false positive. When a function is taking a temporary of scalar type that couldn't be bound to the return type of the function, don't warn, such a program would be il

Re: [PATCH] c++: DR882, main cannot be deleted [PR116169]

2024-08-01 Thread Jason Merrill
On 8/1/24 4:20 PM, Marek Polacek wrote: Bootstrapped/regtested on x86_64-pc-linux-gnu, ok for trunk? OK. -- >8 -- This DR clarifies that "int main() = delete;" is ill-formed. PR c++/116169 gcc/cp/ChangeLog: * decl.cc (cp_finish_decl): Disallow deleting ::main. gcc/testsuit

Re: [PATCH] c++: Move -Wdangling-reference to -Wextra

2024-08-01 Thread Jason Merrill
On 8/1/24 4:20 PM, Marek Polacek wrote: Bootstrapped/regtested on x86_64-pc-linux-gnu, ok for trunk? -- >8 -- Despite a number of mitigations (don't warn for std::span-like classes, lambdas, adding [[gnu::no_dangling]], etc.), the warning still seems to cause some grief. Let's move the warning

Re: [PATCH] c++/coroutines: check for members we use in handle_types [PR105475]

2024-08-01 Thread Jason Merrill
On 8/1/24 12:34 PM, Arsen Arsenović wrote: Tested on x86_64-pc-linux-gnu. OK for trunk? TIA, have a lovely day. -- >8 -- Currently, it is possible to ICE GCC by giving it sufficiently broken code, where sufficiently broken means a std::coroutine_handle missing a default on the p

[committed] libstdc++: Remove unused helper traits

2024-08-01 Thread Jonathan Wakely
Tested x86_64-linux. Pushed to trunk. -- >8 -- These are not used anywhere, we have more efficient variable templates for them instead. They're not documented as extensions, and are easy for users to write if they need them. libstdc++-v3/ChangeLog: * include/bits/utility.h (__is_in_plac

[committed] libstdc++: Remove unnecessary uses of

2024-08-01 Thread Jonathan Wakely
This will probably need a gcc-15/porting_to.html entry at some point. Every time we remove transitive includes of it breaks somebody! Tested x86_64-linux. Pushed to trunk. -- >8 -- We don't need to include all of when we only need uintptr_t from it. By using GCC's internal macro we avoid unnec

[committed] libstdc++: Remove unused parameters from atomic impl details

2024-08-01 Thread Jonathan Wakely
Tested x86_64-linux. Pushed to trunk. -- >8 -- libstdc++-v3/ChangeLog: * include/bits/atomic_base.h (__atomic_impl::compare_exchange_weak): Remove unused parameter. (__atomic_impl::compare_exchange_strong): Likewise. --- libstdc++-v3/include/bits/atomic_base.h | 6 ++

[committed] libstdc++: Use memcmp to optimize std::bitset::_M_is_equal() [PR113807]

2024-08-01 Thread Jonathan Wakely
Tested x86_64-linux. Pushed to trunk. -- >8 -- As noted in the PR the compiler doesn't seem able to do this on its own, so we get better code at all optimization levels by using memcmp. libstdc++-v3/ChangeLog: PR libstdc++/113807 * include/std/bitset (bitset::_M_is_equal()): Use

[committed] libstdc++: Fix incomplete change to reduce iterations for simulators

2024-08-01 Thread Jonathan Wakely
Tested x86_64-linux. Pushed to trunk. -- >8 -- This should have been done as part of r13-693-ge3b8b4f7814c54, but I only added the preprocessor logic and didn't use ARGS in the code. libstdc++-v3/ChangeLog: * testsuite/26_numerics/random/discrete_distribution/operators/values.cc:

[committed] libstdc++: Remove noexcept from non-const std::basic_string::data() [PR99942]

2024-08-01 Thread Jonathan Wakely
I've had this in my local tree for ages, time to push it I think. It's better to be non-conforming than to lie and posibly terminate the whole process (the COW std::string is already non-conforming in C++11 and later anyway). Tested x86_64-linux. Pushed to trunk. -- >8 -- The C++17 non-const ove

[committed] libstdc++: Constrain std::basic_string default constructor [PR113841]

2024-08-01 Thread Jonathan Wakely
I added similar constraints to std::vector recently. The same problem exists for std::string, so this fixes it. Tested x86_64-linux. Pushed to trunk. -- >8 -- This is needed to avoid errors outside the immediate context when evaluating is_default_constructible_v> when A is not default constructi

[PATCH] forwprop: Don't add uses to dce list if debug statement [PR116156]

2024-08-01 Thread Andrew Pinski
The problem here is that when forwprop does a copy prop, into a statement, we mark the uses of that statement as possibly need to be removed. But it just happened that statement was a debug statement, there will be a difference when compiling with debuging info turned on vs off; this is not expecte

[PATCH] c++: Move -Wdangling-reference to -Wextra

2024-08-01 Thread Marek Polacek
Bootstrapped/regtested on x86_64-pc-linux-gnu, ok for trunk? -- >8 -- Despite a number of mitigations (don't warn for std::span-like classes, lambdas, adding [[gnu::no_dangling]], etc.), the warning still seems to cause some grief. Let's move the warning to -Wextra, then. gcc/c-family/ChangeLog:

[PATCH] c++: DR882, main cannot be deleted [PR116169]

2024-08-01 Thread Marek Polacek
Bootstrapped/regtested on x86_64-pc-linux-gnu, ok for trunk? -- >8 -- This DR clarifies that "int main() = delete;" is ill-formed. PR c++/116169 gcc/cp/ChangeLog: * decl.cc (cp_finish_decl): Disallow deleting ::main. gcc/testsuite/ChangeLog: * g++.dg/DRs/dr882.C: New t

[PATCH] c++: fix -Wdangling-reference false positive [PR115987]

2024-08-01 Thread Marek Polacek
Bootstrapped/regtested on x86_64-pc-linux-gnu, ok for trunk? -- >8 -- This fixes another false positive. When a function is taking a temporary of scalar type that couldn't be bound to the return type of the function, don't warn, such a program would be ill-formed. Thanks to Jonathan for reportin

Re: [PATCH v2] RISC-V: Add support to vector stack-clash protection

2024-08-01 Thread Raphael Zinsly
On Thu, Aug 1, 2024 at 3:40 PM Jeff Law wrote: > On 8/1/24 6:01 AM, Raphael Moreira Zinsly wrote: > > +/* Both prologue temp registers are used in the vector probe loop for when > > + stack-clash protection is enabled, so we need to copy SP to a new > > register > > + and set it as CFA during

New Swedish PO file for 'gcc' (version 14.2.0)

2024-08-01 Thread Translation Project Robot
Hello, gentle maintainer. This is a message from the Translation Project robot. A revised PO file for textual domain 'gcc' has been submitted by the Swedish team of translators. The file is available at: https://translationproject.org/latest/gcc/sv.po (This file, 'gcc-14.2.0.sv.po', has ju

[PATCH ver 3] rs6000, Add new overloaded vector shift builtin int128, variants

2024-08-01 Thread Carl Love
GCC developers: Version 3, updated the testcase dg-do link to dg-do compile.  Moved the new documentation again.  Retested on Power 10 LE and BE to verify the dg arguments disable the test on Power10BE but enable the test for Power10LE.  Reran the full regression testsuite.   There were no new

Re: [PATCH] fortran: Fix a pasto in gfc_check_dependency

2024-08-01 Thread Mikael Morin
Hello, Le 01/08/2024 à 12:00, Jakub Jelinek a écrit : Hi! A static analyzer found what seems like a pasto in the PR45019 changes, the second branch of || only accesses sym2 while the first one sym1 except for this one spot. Not sure I'm able to construct a testcase for this though. What is r

Re: [PATCH] fortran: Support optional dummy as BACK argument of MINLOC/MAXLOC.

2024-08-01 Thread Thomas Koenig
Hi Mikael, +  gcc_assert (backexpr->expr_type == EXPR_VARIABLE); drop it, downgrade to checking, or is it worth? Whether it is worth it, I don't know; it's protecting the access to backexpr->symtree a few lines down, idependently of the implementation of maybe_absent_optional_variable.

[PATCH] c++: permit errors inside uninstantiated templates [PR116064]

2024-08-01 Thread Patrick Palka
In recent versions of GCC we've been diagnosing more and more kinds of errors inside a template ahead of time. This is a largely good thing because it catches bugs, typos, dead code etc sooner. But if the template never gets instantiated then such errors are harmless, and can be inconvenient to w

[PATCH] c++: Add unsequenced C++ testcase

2024-08-01 Thread Jakub Jelinek
Hi! This is the testcase I wrote originally and which on top of the https://gcc.gnu.org/pipermail/gcc-patches/2024-August/659154.html patch didn't behave the way I wanted (no warning and no optimizations of [[unsequenced]] function templates which don't have pointer/reference arguments. Posting th

Re: [wwwdocs] OpenMP: gcc-15/changes.html - minor update / projects/gomp - link to TR13

2024-08-01 Thread Jakub Jelinek
On Thu, Aug 01, 2024 at 08:36:59PM +0200, Tobias Burnus wrote: > First, OpenMP TR13 has just been released. Hence, link it from our project > page. > > For the GCC 15 page, I suggest to add ompx_gnu_pinned_mem_alloc (but one can > argue about that) and the nvptx I/O support. We could also talk abo

Re: [PATCH v2] RISC-V: Add support to vector stack-clash protection

2024-08-01 Thread Jeff Law
On 8/1/24 6:01 AM, Raphael Moreira Zinsly wrote: +/* Both prologue temp registers are used in the vector probe loop for when + stack-clash protection is enabled, so we need to copy SP to a new register + and set it as CFA during the loop, we are using T3 for that. */ +#define RISCV_ST

[PATCH] c++: Fix up handling of dependent (late) attributes on function/method types [PR116175]

2024-08-01 Thread Jakub Jelinek
Hi! When working on unsequenced/reproducible attributes, I've noticed that on templates for some attributes decl_attributes isn't called at all, so they are kept in TYPE_ATTRIBUTES without any verification/transformations and also without argument substitution. The following patch fixes that for

[wwwdocs] OpenMP: gcc-15/changes.html - minor update / projects/gomp - link to TR13

2024-08-01 Thread Tobias Burnus
First, OpenMP TR13 has just been released. Hence, link it from our project page. For the GCC 15 page, I suggest to add ompx_gnu_pinned_mem_alloc (but one can argue about that) and the nvptx I/O support. We could also talk about nvptx + constructor support here. Comments, thoughts, remarks be

[Committed] RISC-V: Reject 'd' extension with ILP32E ABI

2024-08-01 Thread Patrick O'Neill
Also add a testcase for -mabi=lp64d where 'd' is required. gcc/ChangeLog: PR target/116111 * config/riscv/riscv.cc (riscv_option_override): Add error. gcc/testsuite/ChangeLog: * gcc.target/riscv/arch-41.c: New test. * gcc.target/riscv/pr116111.c: New test. Signe

[PATCH] c, v2: Add support for unsequenced and reproducible attributes

2024-08-01 Thread Jakub Jelinek
Hi! On Tue, Jul 30, 2024 at 07:04:05PM +0200, Jakub Jelinek wrote: > C23 added in N2956 ( https://open-std.org/JTC1/SC22/WG14/www/docs/n2956.htm ) > two new attributes Here is an updated version of the patch. Based on discussions with paper co-author the patch no longer looks into structs/unions

Re: [PATCH] c++/coroutines: fix actor cases not being added to the current switch [PR109867]

2024-08-01 Thread Jason Merrill
On 8/1/24 12:48 PM, Arsen Arsenović wrote: Tested on x86_64-pc-linux-gnu, no regression. OK for trunk? TIA, have a lovely day. -- >8 -- Previously, we were building and inserting case_labels manually, which lead to them not being added into the currently running switch via "le

Re: [PATCH 0/1] Initial support for AVX10.2

2024-08-01 Thread Andi Kleen
Haochen Jiang writes: > Hi all, > > AVX10.2 tech details has been just published on July 31st in the > following link: > > https://cdrdv2.intel.com/v1/dl/getContent/828965 > > For new features and instructions, we could divide them into two parts. > One is ymm rounding control, the other is the n

Re: [committed] Fix compilation error in 2 1_neg.cc tests

2024-08-01 Thread Jonathan Wakely
On Thu, 1 Aug 2024 at 17:57, François Dumont wrote: > > libstdc++: Make dg-error pattern more accurate > > Remove useless test variable and use a more accurate dg-error > pattern so > that only the ill-formed expression compilation error is considered. > > libstdc++-v3/ChangeLo

New German PO file for 'gcc' (version 14.2.0)

2024-08-01 Thread Translation Project Robot
Hello, gentle maintainer. This is a message from the Translation Project robot. A revised PO file for textual domain 'gcc' has been submitted by the German team of translators. The file is available at: https://translationproject.org/latest/gcc/de.po (This file, 'gcc-14.2.0.de.po', has jus

[PATCH] Add fancy pointer support in std::map/set

2024-08-01 Thread François Dumont
Hi Here is a proposal to add fancy pointer support in std::_Rb_tree container. As you'll see there are still several usages of pointer_traits<>::pointer_to. The ones in _M_header_ptr() are unavoidable. The ones to extract a node or to return a node to the allocator are more questionable. Are

Re: [committed] Fix compilation error in 2 1_neg.cc tests

2024-08-01 Thread François Dumont
    libstdc++: Make dg-error pattern more accurate     Remove useless test variable and use a more accurate dg-error pattern so     that only the ill-formed expression compilation error is considered.     libstdc++-v3/ChangeLog:     * testsuite/23_containers/map/operators/1_neg.cc (te

[PATCH] c++/coroutines: fix actor cases not being added to the current switch [PR109867]

2024-08-01 Thread Arsen Arsenović
Tested on x86_64-pc-linux-gnu, no regression. OK for trunk? TIA, have a lovely day. -- >8 -- Previously, we were building and inserting case_labels manually, which lead to them not being added into the currently running switch via c_add_case_label. This lead to false diagnostics

[PATCH] c++/coroutines: check for members we use in handle_types [PR105475]

2024-08-01 Thread Arsen Arsenović
Tested on x86_64-pc-linux-gnu. OK for trunk? TIA, have a lovely day. -- >8 -- Currently, it is possible to ICE GCC by giving it sufficiently broken code, where sufficiently broken means a std::coroutine_handle missing a default on the promise_type template argument, and missing me

Re: [PATCH] c++: Fix up error recovery of invalid structured bindings used in conditions [PR116113]

2024-08-01 Thread Jason Merrill
On 7/29/24 3:42 AM, Jakub Jelinek wrote: Hi! The following testcase ICEs, because for structured binding error recovery DECL_DECOMP_BASE is kept NULL and the newly added code to pick up saved value from the base assumes that on structured binding bases the TARGET_EXPR will be always there (that

New template for 'gcc' made available

2024-08-01 Thread Translation Project Robot
Hello, gentle maintainer. This is a message from the Translation Project robot. (If you have any questions, send them to .) A new POT file for textual domain 'gcc' has been made available to the language teams for translation. It is archived as: https://translationproject.org/POT-files/gcc

[COMMITTED 24/30] ada: Style fixes: remove blank lines following 'begin' keywords

2024-08-01 Thread Marc Poulhiès
From: Ghjuvan Lacambre The GNAT style guide specifies that there must not be blank lines after 'begin' keywords. gcc/ada/ * backend_utils.adb (Scan_Common_Back_End_Switch): Remove blank line. * errout.adb (Output_JSON_Message): Likewise. * erroutc.adb (Set_Msg_Ch

[COMMITTED 27/30] ada: Crash on access attribute with overloaded prefix denoting reference object

2024-08-01 Thread Marc Poulhiès
From: Gary Dismukes The compiler fails to accept an access attribute where the prefix is the name of an object of a user-defined reference type, and is not prepared to deal with the possibility of overloaded prefixes other than subprogram cases. Such a prefix can either represent the reference ob

[COMMITTED 22/30] ada: Use ?j? in Output_Obsolescent_Entity_Warnings messages

2024-08-01 Thread Marc Poulhiès
From: Viljar Indus These messages are conditionally activated only when -gnatwj (Warn_On_Obsolescent_Feature) is activated. They should use the switch specific insertion character instead. gcc/ada/ * sem_warn.adb (Output_Obsolescent_Entity_Warnings): use the ?j? in warning messa

[COMMITTED 12/30] ada: Change "missing overriding indicator" message from error to warning

2024-08-01 Thread Marc Poulhiès
From: Steve Baird There is no RM rule requiring an overriding indicator in the case where this message is generated; such a rule was discussed many years ago in an AI, but that AI was never approved. So generate a warning message instead of an error message. And don't even do that if we are in an

[COMMITTED 14/30] ada: Fix freezing of Default_Value expressions

2024-08-01 Thread Marc Poulhiès
From: Piotr Trojanek This patch fixes an infinite loop in freezing that occurred when expression of the Default_Value aspect includes a declare expression with an object of the annotated type. gcc/ada/ * sem_ch13.adb (Check_Aspect_Too_Late): Prevent freezing during preanalysis.

[COMMITTED 16/30] ada: exp_pakd.adb: disable packed expansions in CodePeer_Mode

2024-08-01 Thread Marc Poulhiès
From: Ghjuvan Lacambre A previous commit disabled the removal of the Component_Size aspect from GNAT's tree when in CodePeer_Mode. This effectively resulted in CodePeer not ignoring Component_Size anymore. As a side effect, GNAT started expanding packed operations on array types from their high-l

[COMMITTED 11/30] ada: Miscomputed bounds for inner null array aggregates

2024-08-01 Thread Marc Poulhiès
From: Javier Miranda gcc/ada/ * sem_aggr.adb (Collect_Aggr_Bounds): Adjust previous patch to store the bounds of inner null aggregates in the itype; required generate the runtime check of ARM 4.3.3(30). Tested on x86_64-pc-linux-gnu, committed on master. --- gcc/ada/se

[COMMITTED 28/30] ada: Accept duplicate SPARK_Mode pragmas in configuration files

2024-08-01 Thread Marc Poulhiès
From: Piotr Trojanek For consistency, we now accept duplicate SPARK_Mode pragmas in configuration files just like we accept other duplicate pragas there. gcc/ada/ * sem_prag.adb (Analyze_Pragma): Don't check for duplicate SPARK_Mode pragmas in configuration files. Tested on x86

[COMMITTED 03/30] ada: Allow making empty aggregates positional

2024-08-01 Thread Marc Poulhiès
From: Ronan Desplanques This patch makes Exp_Aggr.Convert_To_Positional accepts appropriate empty aggregates. The end goal is to remove violations of the No_Elaboration_Code restriction in some cases of library-level array objects. gcc/ada/ * exp_aggr.adb (Flatten): Do not reject empty

[COMMITTED 26/30] ada: Fix oversight in documentation of At_End_Proc

2024-08-01 Thread Marc Poulhiès
From: Eric Botcazou It is documented for N_Subprogram_Body_Stub instead of N_Subprogram_Body. gcc/ada/ * sinfo.ads (N_Block_Statement): Move At_End_Proc to the end of slot list and alphabetize flag list. (N_Subprogram_Body): Add At_End_Proc. (N_Package_Body): Mov

[PATCH 122/125] gccrs: borrowck: Remove block braces to satisfy GNU style

2024-08-01 Thread Arthur Cohen
From: Jakub Dupak gcc/rust/ChangeLog: * checks/errors/borrowck/rust-bir-dump.cc (renumber_places): Remove unecessary braces. (Dump::go): Remove unecessary braces. (Dump::visit): Remove unecessary braces. (Dump::visit_scope): Remove unecessary braces.

[COMMITTED 23/30] ada: Restrict string interpolation to single string literal

2024-08-01 Thread Marc Poulhiès
From: Javier Miranda gcc/ada/ * par-ch2.adb (P_Interpolated_String_Literal): remove support of multi-line string literals. * doc/gnat_rm/gnat_language_extensions.rst: Update documentation. * gnat_rm.texi: Regenerate. Tested on x86_64-pc-linux-gnu, committed on ma

[COMMITTED 19/30] ada: Define No_Return flag only for subprograms

2024-08-01 Thread Marc Poulhiès
From: Eric Botcazou ...instead of defining it for all entities. gcc/ada/ * einfo.ads (No_Return): Change description and adjust accordingly. * gen_il-gen-gen_entities.adb (Entity_Kind): Remove No_Return. (Subprogram_Kind): Add No_Return. (Generic_Subprogr

[PATCH 119/125] gccrs: borrowck: extract regions from types using VA

2024-08-01 Thread Arthur Cohen
From: Jakub Dupak Biggybag on variance analysis to extract regions of fields from ADT regions. gcc/rust/ChangeLog: * typecheck/rust-tyty-variance-analysis-private.h (class FieldVisitorCtx): Region extraction. * typecheck/rust-tyty-variance-analysis.cc (query_field_regio

[COMMITTED 20/30] ada: Fix bug in resolution of Ghost_Predicate

2024-08-01 Thread Marc Poulhiès
From: Bob Duff This patch fixes a failure of name resolution when a range attribute reference appears in a Ghost_Predicate and the ghost policy is Ignore. gcc/ada/ * sem_ch13.adb (Add_Predicate): Remove the premature "return;". Ghost code needs to be processed by later code in t

[COMMITTED 13/30] ada: Remove Must_Not_Freeze flags from default value expressions

2024-08-01 Thread Marc Poulhiès
From: Piotr Trojanek This is a code cleanup and apparently has no impact on the behavior. The Must_Not_Freeze is saved/set/restored by Preanalyze_Spec_Expression, so it doesn't need to be set before calling that routine and apparently doesn't need to be set after that calling that routine either

[PATCH 118/125] gccrs: borrowck: Free region representation

2024-08-01 Thread Arthur Cohen
From: Jakub Dupak gcc/rust/ChangeLog: * checks/errors/borrowck/rust-bir-free-region.h: New file. Signed-off-by: Jakub Dupak --- .../errors/borrowck/rust-bir-free-region.h| 107 ++ 1 file changed, 107 insertions(+) create mode 100644 gcc/rust/checks/errors/borrowck

[COMMITTED 18/30] ada: Implement full relaxed finalization semantics for controlled objects

2024-08-01 Thread Marc Poulhiès
From: Eric Botcazou These semantics state that the compiler is permitted to enforce none of the guarantees specified by the RM 7.6.1(14/1) and following subclauses, and to instead just let the exception be propagated upward. The guarantees impose a significant overhead in terms of complexity and

[COMMITTED 09/30] ada: Missing adjust of controlled component initialized from container aggregate

2024-08-01 Thread Marc Poulhiès
From: Gary Dismukes In the case of controlled components initialized by a container aggregate, the compiler was suppressing the call to the needed Adjust operation, because it was suppressed for all aggregates. But container aggregates aren't built in place, so target adjustment should still be d

[PATCH 115/125] gccrs: borrowck: BIR: emit moves

2024-08-01 Thread Arthur Cohen
From: Jakub Dupak gcc/rust/ChangeLog: * checks/errors/borrowck/rust-bir-builder-expr-stmt.cc (ExprStmtBuilder::visit): Emit moves. * checks/errors/borrowck/rust-bir-builder-internal.h: Emit moves. * checks/errors/borrowck/rust-bir-builder-lazyboolexpr.h: Emit moves.

[COMMITTED 17/30] ada: Put back -G for binder

2024-08-01 Thread Marc Poulhiès
From: Arnaud Charlet gcc/ada/ * bindgen.adb (Gen_Main): Put back support for -G * bindusg.adb (Display): Put back line for -G * opt.ads (CCG_Mode): Update doc * switch-b.adb (Scan_Binder_Switches): Put back support for -G Tested on x86_64-pc-linux-gnu, committed

[PATCH 109/125] gccrs: unify: Always coerce `!` to the target type.

2024-08-01 Thread Arthur Cohen
Never can... never... exist, so it should always be coerced to the type it is being matched against. This is useful for breaking off of a loop from inside a match, or an if condition, for example. gcc/rust/ChangeLog: * typecheck/rust-unify.cc (UnifyRules::go): Always unify to `ltype` if

[COMMITTED 15/30] ada: Check default value aspects before resolving their expressions

2024-08-01 Thread Marc Poulhiès
From: Piotr Trojanek Check expressions of aspects Default_Value and Default_Component_Value for references to the annotated types just before resolving these expressions. This patch fixes both an asymmetry in processing of those aspects and adds a missing check in GNATprove on aspect Default_Com

[COMMITTED 25/30] ada: Deconstruct workarounds for quantified expressions in contracts

2024-08-01 Thread Marc Poulhiès
From: Piotr Trojanek Apparently we can always safely set the type of a loop parameter from its discrete subtype definition. It looks like the conditional setting was only necessary when preconditions were expanded into dedicated procedures, but we no longer use this expansion. gcc/ada/

[COMMITTED 05/30] ada: Fix test for wrapping loop parameter spec

2024-08-01 Thread Marc Poulhiès
From: Ronan Desplanques This patches fixes a problem where cleanup statements would be missing for some cases of loop parameter specifications that allocate on the secondary stack. gcc/ada/ * sem_ch5.adb (Prepare_Param_Spec_Loop): Fix criterion for wrapping loop statements into

[PATCH 121/125] gccrs: borrowck: Fact collector

2024-08-01 Thread Arthur Cohen
From: Jakub Dupak This is the main Polonius based logic which creates the information Polonius needs from BIR. It is largly guessed and rever engineered, so some aspects are probably wrong. gcc/rust/ChangeLog: * checks/errors/borrowck/rust-bir-fact-collector.h: New file. * check

[PATCH 105/125] gccrs: Recognize unstable as a builtin attribute

2024-08-01 Thread Arthur Cohen
From: Owen Avery gcc/rust/ChangeLog: * util/rust-attribute-values.h (Attributes::UNSTABLE): New. * util/rust-attributes.cc (__definitions): Add Attributes::UNSTABLE. gcc/testsuite/ChangeLog: * rust/compile/unstable-fn.rs: New test. Signed-off-by: Owen A

[COMMITTED 10/30] ada: Followup on previous change for -gnatceg

2024-08-01 Thread Marc Poulhiès
From: Arnaud Charlet gcc/ada/ * osint-c.ads, osint-c.adb (Create_C_File, Close_C_File, Delete_C_File): Put back, needed by LLVM based CCG. * exp_unst.adb (Unnest_Subprogram): Complete previous change by removing now dead code and corresponding ??? comment. Tested

[COMMITTED 30/30] ada: Fix computation of new size when reallocating unbounded string

2024-08-01 Thread Marc Poulhiès
From: Yannick Moy The procedure Realloc_For_Chunk which is used to reallocate an unbounded string when needed may lead in theory to an overflow, due to the use of variable S_Length denoting the current allocated length instead of Source.Last denoting the current string length. Now fixed. This ha

  1   2   3   >