Re: [PATCH] middle-end/104492 - avoid all equality compare dangling pointer diags

2022-04-27 Thread Richard Biener via Gcc-patches
On Wed, 27 Apr 2022, Jakub Jelinek wrote: > On Mon, Apr 25, 2022 at 11:54:34AM +0200, Richard Biener wrote: > > The following extends the equality compare dangling pointer diagnostics > > suppression for uses following free or realloc to also cover those > > following invalidation of auto variable

[PATCH 1/2] LoongArch: Add '(clobber (mem:BLK (scratch)))' to PLV instruction templates.

2022-04-27 Thread Lulu Cheng
gcc/ChangeLog: * config/loongarch/loongarch.md: Add '(clobber (mem:BLK (scratch)))' to PLV instruction templates. --- gcc/config/loongarch/loongarch.md | 40 +-- 1 file changed, 28 insertions(+), 12 deletions(-) diff --git a/gcc/config/loongarch/loonga

[PATCH 2/2] LoongArch: Add fdiv define_expand template.

2022-04-27 Thread Lulu Cheng
gcc/ChangeLog: * config/loongarch/loongarch.md: Add fdiv define_expand template, then generate floating-point division and floating-point reciprocal instructions. --- gcc/config/loongarch/loongarch.md | 6 ++ 1 file changed, 6 insertions(+) diff --git a/gcc/config/loo

Re: [PATCH] middle-end/104492 - avoid all equality compare dangling pointer diags

2022-04-27 Thread Jakub Jelinek via Gcc-patches
On Wed, Apr 27, 2022 at 09:00:51AM +0200, Richard Biener wrote: > > > 2022-04-25 Richard Biener > > > > > > PR middle-end/104492 > > > * gimple-ssa-warn-access.cc > > > (pass_waccess::warn_invalid_pointer): Exclude equality compare > > > diagnostics for all kind of invalidations. > > >

[PATCH] middle-end/105376 - invalid REAL_CST for DFP constant

2022-04-27 Thread Richard Biener via Gcc-patches
We are eventually ICEing in decimal_to_decnumber on non-decimal REAL_VALUE_TYPE that creep in from uses of build_real (..., dconst*) for DFP types. The following fixes the single occurance that matters for the testcase in the PR by instead using build_real_truncate. Bootstrapped and tested on x86

Re: [PATCH] middle-end/104492 - avoid all equality compare dangling pointer diags

2022-04-27 Thread Jakub Jelinek via Gcc-patches
On Wed, Apr 27, 2022 at 09:29:21AM +0200, Jakub Jelinek via Gcc-patches wrote: > I'd say the right thing would be to keep the -Wuse-after-free= stuff as is > and just adjust > - if ((maybe && warn_dangling_pointer < 2) > + if ((equality && warn_dangling_pointer < 3) > + || (maybe && warn_dan

Re: [PATCH] middle-end/104492 - avoid all equality compare dangling pointer diags

2022-04-27 Thread Richard Biener via Gcc-patches
On Wed, 27 Apr 2022, Jakub Jelinek wrote: > On Wed, Apr 27, 2022 at 09:00:51AM +0200, Richard Biener wrote: > > > > 2022-04-25 Richard Biener > > > > > > > > PR middle-end/104492 > > > > * gimple-ssa-warn-access.cc > > > > (pass_waccess::warn_invalid_pointer): Exclude e

Re: [PATCH] middle-end/104492 - avoid all equality compare dangling pointer diags

2022-04-27 Thread Jakub Jelinek via Gcc-patches
On Wed, Apr 27, 2022 at 09:43:59AM +0200, Richard Biener wrote: > but not any operations on the pointer value (compare, pointer-plus, > difference, masking, etc.). A simple-minded implementation would > then be > > if ((!gimple_vuse (use_stmt) && warn_dangling_pointer < 3) > || (maybe &&

[PATCH] testsuite: Add arm testcase for PR105374

2022-04-27 Thread Christophe Lyon via Gcc-patches
As discussed in the PR, here is the testcase with the appropriate dg-* directives. Tested on arm-none-eabi with 1 -mcpu=cortex-a7/-mfloat-abi=soft/-march=armv7ve+simd 2 -mcpu=cortex-a7/-mfloat-abi=hard/-march=armv7ve+simd 3 -mthumb/-mcpu=cortex-a7/-mfloat-abi=hard/-march=armv7ve+simd 4 -mthumb/-mf

[Ada] Revert r12-6599 (Fix up handling of ghost units [PR104027])

2022-04-27 Thread Pierre-Marie de Rodat via Gcc-patches
That change was short-circuiting too much, the regular processing (in particular writing ALI files) was bypassed, causing troubles with e.g. gnatmake or gprbuild down the road. Thanks to r12-6943, this is no longer necessary, so revert it. Tested on x86_64-pc-linux-gnu, committed on trunk gcc/ada

Re: [PATCH] testsuite: Add arm testcase for PR105374

2022-04-27 Thread Jakub Jelinek via Gcc-patches
On Wed, Apr 27, 2022 at 09:50:32AM +0200, Christophe Lyon via Gcc-patches wrote: > As discussed in the PR, here is the testcase with the appropriate dg-* > directives. > > Tested on arm-none-eabi with > 1 -mcpu=cortex-a7/-mfloat-abi=soft/-march=armv7ve+simd > 2 -mcpu=cortex-a7/-mfloat-abi=hard/-ma

Re: [gcov v2 14/14] gcov: Add section for freestanding environments

2022-04-27 Thread Martin Liška
On 4/26/22 19:49, Sebastian Huber wrote: > Should I use "-ftest-coverage -fprofile-arcs" or "--coverage" in the tutorial? The later one, please. Cheers, Martin

Re: [PATCH] middle-end/104492 - avoid all equality compare dangling pointer diags

2022-04-27 Thread Richard Biener via Gcc-patches
On Wed, 27 Apr 2022, Jakub Jelinek wrote: > On Wed, Apr 27, 2022 at 09:43:59AM +0200, Richard Biener wrote: > > but not any operations on the pointer value (compare, pointer-plus, > > difference, masking, etc.). A simple-minded implementation would > > then be > > > > if ((!gimple_vuse (use_st

[PATCH] Honor COMDAT for mergeable constant sections

2022-04-27 Thread Ilya Leoshkevich via Gcc-patches
Bootstrapped and regtested on x86_64-redhat-linux and s390x-redhat-linux. Ok for master (or GCC 13 in case this doesn't fit stage4 criteria)? Building C++ template-heavy code with ASan sometimes leads to bogus "defined in discarded section" linker errors. The reason is that .rodata.FUNC.cstN s

Re: [PATCH] Honor COMDAT for mergeable constant sections

2022-04-27 Thread Jakub Jelinek via Gcc-patches
On Wed, Apr 27, 2022 at 11:27:49AM +0200, Ilya Leoshkevich via Gcc-patches wrote: > Bootstrapped and regtested on x86_64-redhat-linux and > s390x-redhat-linux. Ok for master (or GCC 13 in case this doesn't fit > stage4 criteria)? I'd prefer to defer this to GCC 13 at this point. Furthermore, doe

Re: [PATCH] middle-end/104492 - avoid all equality compare dangling pointer diags

2022-04-27 Thread Richard Biener via Gcc-patches
On Wed, 27 Apr 2022, Richard Biener wrote: > On Wed, 27 Apr 2022, Jakub Jelinek wrote: > > > On Wed, Apr 27, 2022 at 09:43:59AM +0200, Richard Biener wrote: > > > but not any operations on the pointer value (compare, pointer-plus, > > > difference, masking, etc.). A simple-minded implementation

Re: [PATCH] Honor COMDAT for mergeable constant sections

2022-04-27 Thread Ilya Leoshkevich via Gcc-patches
On Wed, 2022-04-27 at 11:33 +0200, Jakub Jelinek wrote: > On Wed, Apr 27, 2022 at 11:27:49AM +0200, Ilya Leoshkevich via Gcc- > patches wrote: > > Bootstrapped and regtested on x86_64-redhat-linux and > > s390x-redhat-linux.  Ok for master (or GCC 13 in case this doesn't > > fit > > stage4 criteria

Re: [PATCH] middle-end/104492 - avoid all equality compare dangling pointer diags

2022-04-27 Thread Jakub Jelinek via Gcc-patches
On Wed, Apr 27, 2022 at 11:56:55AM +0200, Richard Biener wrote: > Bootstrapped & tested on x86_64-unknown-linux-gnu. > > OK? I think a testcase from the #c0 of the PR would be nice, but it can be added incrementally, so ok for trunk and unless somebody beats me to it, I'll try to reduce the testc

Re: [PATCH] middle-end/104492 - avoid all equality compare dangling pointer diags

2022-04-27 Thread Richard Biener via Gcc-patches
On Wed, 27 Apr 2022, Jakub Jelinek wrote: > On Wed, Apr 27, 2022 at 11:56:55AM +0200, Richard Biener wrote: > > Bootstrapped & tested on x86_64-unknown-linux-gnu. > > > > OK? > > I think a testcase from the #c0 of the PR would be nice, but it can > be added incrementally, so ok for trunk and unl

Re: [PATCH] Honor COMDAT for mergeable constant sections

2022-04-27 Thread Ilya Leoshkevich via Gcc-patches
On Wed, 2022-04-27 at 11:59 +0200, Ilya Leoshkevich via Gcc-patches wrote: > On Wed, 2022-04-27 at 11:33 +0200, Jakub Jelinek wrote: > > On Wed, Apr 27, 2022 at 11:27:49AM +0200, Ilya Leoshkevich via Gcc- > > patches wrote: > > > Bootstrapped and regtested on x86_64-redhat-linux and > > > s390x-red

[PATCH] testsuite: Add test case for pack/unpack bifs at soft-float [PR105334]

2022-04-27 Thread Kewen.Lin via Gcc-patches
Hi, As discussed in PR105334, this patch is to add the test coverage for the two recent fixes r12-8091 and r12-8226 from Segher, aix is skipped since it takes soft-float and long-double-128 incompatible. I noticed the referred test case pack02.c skips if powerpc*-*-darwin*, but it's for do-run an

Re: [PATCH] vect, tree-optimization/105219: Disable epilogue vectorization when peeling for alignment

2022-04-27 Thread Richard Biener via Gcc-patches
On Wed, 27 Apr 2022, Richard Biener wrote: > On Tue, 26 Apr 2022, Richard Sandiford wrote: > > > "Andre Vieira (lists)" writes: > > > Hi, > > > > > > This patch disables epilogue vectorization when we are peeling for > > > alignment in the prologue and we can't guarantee the main vectorized >

Re: [PATCH] vect, tree-optimization/105219: Disable epilogue vectorization when peeling for alignment

2022-04-27 Thread Richard Biener via Gcc-patches
On Wed, 27 Apr 2022, Richard Biener wrote: > On Wed, 27 Apr 2022, Richard Biener wrote: > > > On Tue, 26 Apr 2022, Richard Sandiford wrote: > > > > > "Andre Vieira (lists)" writes: > > > > Hi, > > > > > > > > This patch disables epilogue vectorization when we are peeling for > > > > alignment

[PATCH v2] loongarch: ignore zero-size fields in calling convention

2022-04-27 Thread Xi Ruoyao via Gcc-patches
On Wed, 2022-04-27 at 14:57 +0800, Lulu Cheng wrote: > I think the modification should be below. > > > > > > > if (!TYPE_P (TREE_TYPE (f))) > > > >     return -1; I think (!TYPE_P (TREE_TYPE (f)) will never be true (the code handling calling convention of other ports do

Re: [PATCH v2] loongarch: ignore zero-size fields in calling convention

2022-04-27 Thread Lulu Cheng
OK! 在 2022/4/27 下午7:45, Xi Ruoyao 写道: On Wed, 2022-04-27 at 14:57 +0800, Lulu Cheng wrote: I think the modification should be below. if (!TYPE_P (TREE_TYPE (f)))     return -1; I think (!TYPE_P (TREE_TYPE (f)) will never be true (the code handling calling conventio

[PATCH] tree-optimization/105219 - bogus max iters for vectorized epilogue

2022-04-27 Thread Richard Biener via Gcc-patches
The following makes sure to take into account prologue peeling when trying to narrow down the maximum number of iterations computed for the epilogue of a vectorized epilogue. Bootstrap & regtest running on x86_64-unknown-linux-gnu. I did not verify this solves the original aarch64 testcase yet bu

Re: [PATCH] testsuite: Add test case for pack/unpack bifs at soft-float [PR105334]

2022-04-27 Thread Segher Boessenkool
Hi! Thank you for doing this testcase. On Wed, Apr 27, 2022 at 06:29:07PM +0800, Kewen.Lin wrote: > As discussed in PR105334, this patch is to add the test coverage for > the two recent fixes r12-8091 and r12-8226 from Segher, aix is skipped > since it takes soft-float and long-double-128 incompa

Re: [PATCH] Honor COMDAT for mergeable constant sections

2022-04-27 Thread Jakub Jelinek via Gcc-patches
On Wed, Apr 27, 2022 at 11:59:49AM +0200, Ilya Leoshkevich wrote: > I get a .LASANPC reloc there in the first place because of > https://patchwork.ozlabs.org/project/gcc/patch/20190702085154.26981-1-...@linux.ibm.com/ > but of course it may happen for other reasons as well. In that case I don't se

Re: [PATCH] c++: enum in generic lambda at global scope [PR105398]

2022-04-27 Thread Patrick Palka via Gcc-patches
On Tue, 26 Apr 2022, Marek Polacek via Gcc-patches wrote: > We crash compiling this test since r11-7993 which changed > lookup_template_class_1 so that we only call tsubst_enum when > > !uses_template_parms (current_nonlambda_scope ()) > > But here current_nonlambda_scope () is the global NAME

[PATCH] ada: Fix build for RTEMS

2022-04-27 Thread Sebastian Huber
Commit 621cccba3f8b0cd2757feda171e66e3820b55c2c broke the Ada build for all RTEMS targets except aarch64. gcc/ada/ * tracebak.c: Add support for ARM RTEMS. Add support for RTEMS to PPC ELF. Add support for RTEMS to SPARC. Merge aarch64 support of Linux and RTEMS. --- gc

Re: [PATCH] ada: Fix build for RTEMS

2022-04-27 Thread Arnaud Charlet via Gcc-patches
This patch is OK, thank you and sorry for the breakage! Arno > Commit 621cccba3f8b0cd2757feda171e66e3820b55c2c broke the Ada build for all > RTEMS targets except aarch64. > > gcc/ada/ > >* tracebak.c: Add support for ARM RTEMS. Add support for RTEMS to PPC >ELF. Add support for RTEMS

Re: [PATCH] Honor COMDAT for mergeable constant sections

2022-04-27 Thread Jakub Jelinek via Gcc-patches
On Wed, Apr 27, 2022 at 02:23:00PM +0200, Jakub Jelinek wrote: > On Wed, Apr 27, 2022 at 11:59:49AM +0200, Ilya Leoshkevich wrote: > > I get a .LASANPC reloc there in the first place because of > > https://patchwork.ozlabs.org/project/gcc/patch/20190702085154.26981-1-...@linux.ibm.com/ > > but of c

Re: [PATCH] testsuite: Add test case for pack/unpack bifs at soft-float [PR105334]

2022-04-27 Thread David Edelsohn via Gcc-patches
On Wed, Apr 27, 2022 at 8:22 AM Segher Boessenkool wrote: > > Hi! > > Thank you for doing this testcase. > > On Wed, Apr 27, 2022 at 06:29:07PM +0800, Kewen.Lin wrote: > > As discussed in PR105334, this patch is to add the test coverage for > > the two recent fixes r12-8091 and r12-8226 from Seghe

Re: [PATCH] c++: enum in generic lambda at global scope [PR105398]

2022-04-27 Thread Marek Polacek via Gcc-patches
On Wed, Apr 27, 2022 at 08:24:54AM -0400, Patrick Palka wrote: > On Tue, 26 Apr 2022, Marek Polacek via Gcc-patches wrote: > > > We crash compiling this test since r11-7993 which changed > > lookup_template_class_1 so that we only call tsubst_enum when > > > > !uses_template_parms (current_nonl

Re: [PATCH] vect, tree-optimization/105219: Disable epilogue vectorization when peeling for alignment

2022-04-27 Thread Andre Vieira (lists) via Gcc-patches
On 27/04/2022 07:35, Richard Biener wrote: On Tue, 26 Apr 2022, Richard Sandiford wrote: "Andre Vieira (lists)" writes: Hi, This patch disables epilogue vectorization when we are peeling for alignment in the prologue and we can't guarantee the main vectorized loop is entered.  This is to p

Re: [PATCH] tree-optimization/105219 - bogus max iters for vectorized epilogue

2022-04-27 Thread Richard Biener via Gcc-patches
On Wed, 27 Apr 2022, Richard Biener wrote: > The following makes sure to take into account prologue peeling > when trying to narrow down the maximum number of iterations > computed for the epilogue of a vectorized epilogue. > > Bootstrap & regtest running on x86_64-unknown-linux-gnu. > > I did n

Re: [PATCH] vect, tree-optimization/105219: Disable epilogue vectorization when peeling for alignment

2022-04-27 Thread Richard Biener via Gcc-patches
On Wed, 27 Apr 2022, Andre Vieira (lists) wrote: > > On 27/04/2022 07:35, Richard Biener wrote: > > On Tue, 26 Apr 2022, Richard Sandiford wrote: > > > >> "Andre Vieira (lists)" writes: > >>> Hi, > >>> > >>> This patch disables epilogue vectorization when we are peeling for > >>> alignment in th

[PATCH] libstdc++: Update {x86_64,i?86,aarch64,s390x,ppc{,64,64le}} baseline_symbols.txt

2022-04-27 Thread Jakub Jelinek via Gcc-patches
Hi! The following patch updates baseline_symbols.txt on arches where I have latest libstdc++ builds (my ws + Fedora package builds). I've manually excluded: +FUNC:_ZNKSt17__gnu_cxx_ieee1287num_getIcSt19istreambuf_iteratorIcSt11char_traitsIcEEE14_M_extract_intB5cxx11IjEES4_S4_S4_RSt8ios_baseRSt12_I

[committed] libstdc++: Add pretty printer for std::atomic

2022-04-27 Thread Jonathan Wakely via Gcc-patches
Tested x86_64-linux, pushed to trunk. -- >8 -- For the atomic specializations for shared_ptr and weak_ptr we can reuse the existing SharedPointerPrinter, with a small tweak. libstdc++-v3/ChangeLog: * python/libstdcxx/v6/printers.py (SharedPointerPrinter): Add support for atomic>

Re: [PATCH] c++: ICE with temporary of class type in DMI [PR100252]

2022-04-27 Thread Patrick Palka via Gcc-patches
On Tue, 26 Apr 2022, Marek Polacek wrote: > Consider > > struct A { > int x; > int y = x; > }; > > struct B { > int x = 0; > int y = A{x}.y; // #1 > }; > > where for #1 we end up with > > {.x=(&)->x, .y=(&)->x} > > that is, two PLACEHOLDER_EXPRs for different types o

Re: [PATCH] libstdc++: Update {x86_64, i?86, aarch64, s390x, ppc{, 64, 64le}} baseline_symbols.txt

2022-04-27 Thread Jonathan Wakely via Gcc-patches
On Wed, 27 Apr 2022 at 15:18, Jakub Jelinek wrote: > > Hi! > > The following patch updates baseline_symbols.txt on arches where I have > latest libstdc++ builds (my ws + Fedora package builds). > I've manually excluded: > +FUNC:_ZNKSt17__gnu_cxx_ieee1287num_getIcSt19istreambuf_iteratorIcSt11char_tr

[PATCH RFA] c-family: attribute ((aligned, mode)) [PR100545]

2022-04-27 Thread Jason Merrill via Gcc-patches
The problem here was that handle_mode_attribute clobbered the changes of any previous attribute, only copying type qualifiers to the new type. And common_handle_aligned_attribute had previously set up the typedef, so when we later called set_underlying_type it saw DECL_ORIGINAL_TYPE set and just r

[PATCH] testsuite: Add testcase for dangling pointer equality bogus warning [PR104492]

2022-04-27 Thread Jakub Jelinek via Gcc-patches
On Wed, Apr 27, 2022 at 12:02:33PM +0200, Richard Biener wrote: > On Wed, 27 Apr 2022, Jakub Jelinek wrote: > > > On Wed, Apr 27, 2022 at 11:56:55AM +0200, Richard Biener wrote: > > > Bootstrapped & tested on x86_64-unknown-linux-gnu. > > > > > > OK? > > > > I think a testcase from the #c0 of th

Re: [PATCH] c++: enum in generic lambda at global scope [PR105398]

2022-04-27 Thread Jason Merrill via Gcc-patches
On 4/27/22 08:59, Marek Polacek wrote: On Wed, Apr 27, 2022 at 08:24:54AM -0400, Patrick Palka wrote: On Tue, 26 Apr 2022, Marek Polacek via Gcc-patches wrote: We crash compiling this test since r11-7993 which changed lookup_template_class_1 so that we only call tsubst_enum when !uses_temp

Re: [PATCH] testsuite: Add testcase for dangling pointer equality bogus warning [PR104492]

2022-04-27 Thread Richard Biener via Gcc-patches
> Am 27.04.2022 um 17:46 schrieb Jakub Jelinek : > > On Wed, Apr 27, 2022 at 12:02:33PM +0200, Richard Biener wrote: >>> On Wed, 27 Apr 2022, Jakub Jelinek wrote: >>> >>> On Wed, Apr 27, 2022 at 11:56:55AM +0200, Richard Biener wrote: Bootstrapped & tested on x86_64-unknown-linux-gnu. >>

Unreviewed D doc patch

2022-04-27 Thread Rainer Orth
The following patch doc: Document Solaris D bootstrap requirements [PR 103528] https://gcc.gnu.org/pipermail/gcc-patches/2022-March/591844.html has remained unreviewed for 6 weeks now, despite a reminder. It would be good to get this into GCC 12. Thanks. Rainer --

Re: [PATCH] middle-end/105376 - invalid REAL_CST for DFP constant

2022-04-27 Thread Joseph Myers
On Wed, 27 Apr 2022, Richard Biener via Gcc-patches wrote: > Is this the correct strathegy to deal with this problem? Would > it be valid to just set ->is_decimal in build_real based on Just setting ->decimal isn't correct; that signifies that ->sig stores the number in decimal128 format (host-

Re: [PATCH RFA] c-family: attribute ((aligned, mode)) [PR100545]

2022-04-27 Thread Marek Polacek via Gcc-patches
On Wed, Apr 27, 2022 at 11:19:57AM -0400, Jason Merrill via Gcc-patches wrote: > The problem here was that handle_mode_attribute clobbered the changes of any > previous attribute, only copying type qualifiers to the new type. And > common_handle_aligned_attribute had previously set up the typedef,

Re: [PATCH] c++: enum in generic lambda at global scope [PR105398]

2022-04-27 Thread Marek Polacek via Gcc-patches
On Wed, Apr 27, 2022 at 11:47:02AM -0400, Jason Merrill wrote: > On 4/27/22 08:59, Marek Polacek wrote: > > On Wed, Apr 27, 2022 at 08:24:54AM -0400, Patrick Palka wrote: > > > On Tue, 26 Apr 2022, Marek Polacek via Gcc-patches wrote: > > > > > > > We crash compiling this test since r11-7993 which

Re: [PATCH] c++: enum in generic lambda at global scope [PR105398]

2022-04-27 Thread Jason Merrill via Gcc-patches
On 4/27/22 13:00, Marek Polacek wrote: On Wed, Apr 27, 2022 at 11:47:02AM -0400, Jason Merrill wrote: On 4/27/22 08:59, Marek Polacek wrote: On Wed, Apr 27, 2022 at 08:24:54AM -0400, Patrick Palka wrote: On Tue, 26 Apr 2022, Marek Polacek via Gcc-patches wrote: We crash compiling this test s

Re: [PATCH RFA] c-family: attribute ((aligned, mode)) [PR100545]

2022-04-27 Thread Joseph Myers
On Wed, 27 Apr 2022, Jason Merrill via Gcc-patches wrote: > + if (typedef_variant_p (type)) > + { > + /* Set up the typedef all over again. */ This seems wrong when the typedef is just being used in another declaration with the mode attribute, as opposed to being defined using th

Re: [OG11-committed][stage1-patch] Fortran: Fix finalization resolution with deep copy (was: [Patch][Stage 1] Fortran/OpenMP: Support mapping of DT with allocatable components)

2022-04-27 Thread Tobias Burnus
More testing found more issues. Instead of adding more band aid to the pre-existing band aid, which was extended before, let's try a different approach: Just ensure that all component types are resolved (which includes finalizers) before continuing with the derived type. This also resolves the fi

[PATCH v2] c++: ICE with temporary of class type in DMI [PR100252]

2022-04-27 Thread Marek Polacek via Gcc-patches
On Wed, Apr 27, 2022 at 11:00:46AM -0400, Patrick Palka wrote: > On Tue, 26 Apr 2022, Marek Polacek wrote: > > > Consider > > > > struct A { > > int x; > > int y = x; > > }; > > > > struct B { > > int x = 0; > > int y = A{x}.y; // #1 > > }; > > > > where for #1 we end up

[patch, fortran, doc] Mention new CONVERT options for POWER

2022-04-27 Thread Thomas Koenig via Gcc-patches
Hi, as we say in German "Nicht documentiert ist nicht gemacht", if it is not documented, it wasn't done. So I thought it would be time to document the changes to the various ways of specifying CONVERT before gcc12 went out of the door, so here is a patch for that. If that goes in, I will also w

[PATCH] c++: global-namespace-qualified var after class def [PR90107]

2022-04-27 Thread Marek Polacek via Gcc-patches
Here we wrongly reject the definition of "::N::a" struct A; namespace N { extern A a; } struct A {} ::N::a; because our code to diagnose a missing ; after a class definition doesn't realize that :: can follow a class definition. Bootstrapped/regtested on x86_64-pc-linux-gnu, ok for trunk/1

Re: [PATCH RFA] c-family: attribute ((aligned, mode)) [PR100545]

2022-04-27 Thread Jason Merrill via Gcc-patches
On 4/27/22 13:02, Joseph Myers wrote: On Wed, 27 Apr 2022, Jason Merrill via Gcc-patches wrote: + if (typedef_variant_p (type)) + { + /* Set up the typedef all over again. */ This seems wrong when the typedef is just being used in another declaration with the mode attribut

Re: [PATCH] c++: global-namespace-qualified var after class def [PR90107]

2022-04-27 Thread Jason Merrill via Gcc-patches
On 4/27/22 18:45, Marek Polacek wrote: Here we wrongly reject the definition of "::N::a" struct A; namespace N { extern A a; } struct A {} ::N::a; because our code to diagnose a missing ; after a class definition doesn't realize that :: can follow a class definition. Bootstrapped/regt

Re: [PATCH v2] loongarch: ignore zero-size fields in calling convention

2022-04-27 Thread Lulu Cheng
I have pushed upstream. Thanks. Lulu Cheng 在 2022/4/27 下午7:45, Xi Ruoyao 写道: On Wed, 2022-04-27 at 14:57 +0800, Lulu Cheng wrote: I think the modification should be below. if (!TYPE_P (TREE_TYPE (f)))     return -1; I think (!TYPE_P (TREE_TYPE (f)) will never be tr

Re: [PATCH] testsuite: Skip target not support -pthread [pr104676].

2022-04-27 Thread Kito Cheng via Gcc-patches
Committed to trunk. On Tue, Apr 19, 2022 at 3:08 PM Richard Biener via Gcc-patches wrote: > > On Tue, 19 Apr 2022, jiawei wrote: > > > The "ftree-parallelize-loops=" imply -pthread option in gcc/gcc.cc, > > some target are not support pthread like elf target use newlib, > > and will get an error:

Re: [PATCH 0/3] RISC-V: Add Ratified Cache Management Operation ISA Extensions

2022-04-27 Thread Kito Cheng via Gcc-patches
Generally this patch LGTM, but let's defer to GCC 13 :) For builtin function...I guess we might need a document in https://github.com/riscv-non-isa/riscv-c-api-doc first. On Fri, Mar 25, 2022 at 2:21 PM wrote: > > From: yulong-plct > > This patchset adds support for three recently ratified RIS

[committed][wwwdocs] gcc-12/changes.html: Document RISC-V changes

2022-04-27 Thread Kito Cheng
--- htdocs/gcc-12/changes.html | 13 - 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/htdocs/gcc-12/changes.html b/htdocs/gcc-12/changes.html index 78b7b05f..e9f132c0 100644 --- a/htdocs/gcc-12/changes.html +++ b/htdocs/gcc-12/changes.html @@ -736,7 +736,18 @@ function M

Re: [PATCH] testsuite: Add test case for pack/unpack bifs at soft-float [PR105334]

2022-04-27 Thread Kewen.Lin via Gcc-patches
on 2022/4/27 8:46 PM, David Edelsohn wrote: > On Wed, Apr 27, 2022 at 8:22 AM Segher Boessenkool > wrote: >> >> Hi! >> >> Thank you for doing this testcase. >> >> On Wed, Apr 27, 2022 at 06:29:07PM +0800, Kewen.Lin wrote: >>> As discussed in PR105334, this patch is to add the test coverage for >>>

[PATCH][_GLIBCXX_INLINE_VERSION] Fix std::random_device definition

2022-04-27 Thread François Dumont via Gcc-patches
Hi     Still time for this fix for gcc 12 ?     If so I'll make sure to run tests quickly, especially the abi.exp one to confirm that the cleanup in gnu-versioned-namespace.ver do not need to be replaced by the same in __8 namespace. libstdc++: [_GLIBCXX_INLINE_VERSION] Fix std::random_devic

[PATCH] cgraph: Don't verify semantic_interposition flag for aliases [PR105399]

2022-04-27 Thread Jakub Jelinek via Gcc-patches
Hi! The following testcase ICEs, because the ctors during cc1plus all have !opt_for_fn (decl, flag_semantic_interposition) - they have NULL DECL_FUNCTION_SPECIFIC_OPTIMIZATION (decl) and optimization_default_node is for -Ofast and so has flag_semantic_interposition cleared. During free lang data,

[PATCH] testsuite: vect: update unaligned message

2022-04-27 Thread Alexandre Oliva via Gcc-patches
gcc.dg/vect/costmodel/ppc/costmodel-vect-31a.c covers ppc variants that accept and reject misaligned accesses. The message that it expects for rejection was removed in the gcc-11 development cycle by commit r11-1969. The patch adjusted multiple tests to use the message introduced in r11-1945, b

[PATCH][stage1] Embed real_value into REAL_CST

2022-04-27 Thread Richard Biener via Gcc-patches
The following removes the indirection to real_value from REAL_CST which doesn't seem to serve any useful purpose. Any sharing can be achieved by sharing the actual REAL_CST (which is what usually happens when copying trees) and sharing of real_value amongst different REAL_CST doesn't happen as far

[PATCH] libstdc++: ppc: conditionalize vsx-only simd intrinsics

2022-04-27 Thread Alexandre Oliva via Gcc-patches
libstdc++'s bits/simd.h section for PPC (Altivec) defines various intrinsic vector types that are only available along with VSX: 64-bit long double, double, (un)signed long long, and 64-bit (un)signed long. experimental/simd/standard_abi_usable{,_2}.cc tests error out reporting the unmet require