Re: [PATCH v3] Optimize initialization of small padded objects

2024-08-23 Thread Richard Biener
> Am 24.08.2024 um 06:59 schrieb Alexandre Oliva : > > Hello, Richi, > > Thanks for the review and the feedback. > > On Aug 22, 2024, Richard Biener wrote: > >>> + /* If the object is small enough to go in registers, and it's >>> + not required to be constructed in memory, c

[PATCH v3] Optimize initialization of small padded objects

2024-08-23 Thread Alexandre Oliva
Hello, Richi, Thanks for the review and the feedback. On Aug 22, 2024, Richard Biener wrote: >> + /* If the object is small enough to go in registers, and it's >> + not required to be constructed in memory, clear it first. >> + That will avoid wasting cycles preserving a

Re: [PATCH 5/9 v2] c++, coroutines: Only allow void get_return_object if the ramp is void [PR100476].

2024-08-23 Thread Jason Merrill
On 8/23/24 2:30 PM, Iain Sandoe wrote: Hi Jason + /* Check for a bad get return object type. */ + tree gro_return_type = FUNC_OR_METHOD_TYPE_P (TREE_TYPE (get_ro_meth)) + ? TREE_TYPE (TREE_TYPE (get_ro_meth)) + : TREE_TYPE (get_ro_meth); Is this t

Re: [PATCH 4/9 v2] c++, coroutines: Fix handling of early exceptions [PR113773].

2024-08-23 Thread Jason Merrill
On 8/23/24 10:36 AM, Iain Sandoe wrote: Hi Jason, + tree iarc_m = lookup_member (frame_type, coro_frame_i_a_r_c_id, + 1, 0, tf_warning_or_error); + tree iarc_x = build_class_member_access_expr (deref_fp, iarc_m, NULL_TREE, +

Re: [PATCH 3/9 v3] c++, coroutines: Separate allocator work from the ramp body build.

2024-08-23 Thread Jason Merrill
On 8/23/24 9:41 AM, Iain Sandoe wrote: http://eel.is/c++draft/dcl.fct.def.coroutine#12 (sentence 2) says " If both a usual deallocation function with only a pointer parameter and a usual deallocation function with both a pointer parameter and a size parameter are found, then the selected deall

Re: [PATCH] gm2: export all libc number conversion functions

2024-08-23 Thread Gaius Mulley
Wilken Gottwalt writes: > Export all string to integral and floating point number conversion functions > (atof, atoi, atol, atoll, strtod, strtof, strtold, strtol, strtoll, strtoul, > strtoull). > > gcc/gm2: > * gm2-libs/libc.def: Export all string to number conversion functions. > > Signed

[committed] libstdc++: Update and clarify Doxygen version requirements in manual

2024-08-23 Thread Jonathan Wakely
Pushed to trunk. -- >8 -- There are lots of bugs that affect libstdc++ output from Doxygen, so using 1.9.6 or later is recommended. Give a lower minimum, because some distros still use 1.9.1 and that will work, albeit suboptimally. libstdc++-v3/ChangeLog: * doc/xml/manual/documentation_

[committed] libstdc++: Hide std::tuple internals from Doxygen docs

2024-08-23 Thread Jonathan Wakely
Pushed to trunk. -- >8 -- libstdc++-v3/ChangeLog: * include/std/tuple: Do not include implementation details in Doxygen documentation. --- libstdc++-v3/include/std/tuple | 2 ++ 1 file changed, 2 insertions(+) diff --git a/libstdc++-v3/include/std/tuple b/libstdc++-v3/include/s

[committed] libstdc++: Improve Doxygen docs for std::allocator_traits specializations

2024-08-23 Thread Jonathan Wakely
Pushed to trunk. -- >8 -- The main fix here is to use @header so that the docs show the correct header file instead of an internal header like alloc_traits.h. libstdc++-v3/ChangeLog: * include/bits/alloc_traits.h: Improve doxygen docs for allocator_traits specializations.

Re: [PATCH] tree-optimization/116463 - complex lowering leaves around dead stmts

2024-08-23 Thread Andrew Pinski
On Fri, Aug 23, 2024 at 5:38 AM Richard Biener wrote: > > Complex lowering generally replaces existing complex defs with > COMPLEX_EXPRs but those might be dead when it can always refer to > components from the lattice. This in turn can pessimize followup > transforms like forwprop and reassoc, t

Re: [PATCH] c++/coros: do not assume coros don't nest [PR113457]

2024-08-23 Thread Arsen Arsenović
Iain Sandoe writes: >> static tree >> get_awaitable_var (suspend_point_kind suspend_kind, tree v_type) >> { >> - static int awn = 0; >> + auto cinfo = get_coroutine_info (current_function_decl); >> + gcc_assert (cinfo); > > If the purpose of this is to check for mistakes during development (i.

Re: [PATCH] c++/coros: do not assume coros don't nest [PR113457]

2024-08-23 Thread Iain Sandoe
Hi Arsen, sorry, I missed one point when I looked through this earlier .. > On 23 Aug 2024, at 20:23, Arsen Arsenović wrote: > > Tested against folly and cppcoro, currently regstrapping on > x86_64-pc-linux-gnu. coroutine.exp and coro-torture.exp passed. > > OK for trunk? (after regstrap) >

[PATCH] c++/coros: do not assume coros don't nest [PR113457]

2024-08-23 Thread Arsen Arsenović
Tested against folly and cppcoro, currently regstrapping on x86_64-pc-linux-gnu. coroutine.exp and coro-torture.exp passed. OK for trunk? (after regstrap) -- >8 -- In the testcase presented in the PR, during template expansion, an tsubst of an operand causes a lambda coroutine to

[r15-3128 Regression] FAIL: gcc.target/i386/part-vect-complexhf.c scan-assembler-times vfmaddcph[ \\t] 1 on Linux/x86_64

2024-08-23 Thread haochen.jiang
On Linux/x86_64, de1923f9f4d5344694c22ca883aeb15caf635734 is the first bad commit commit de1923f9f4d5344694c22ca883aeb15caf635734 Author: Richard Biener Date: Fri Aug 23 13:44:29 2024 +0200 tree-optimization/116463 - complex lowering leaves around dead stmts caused FAIL: gcc.target/i386/

[PATCH 5/9 v2] c++, coroutines: Only allow void get_return_object if the ramp is void [PR100476].

2024-08-23 Thread Iain Sandoe
Hi Jason >>+ /* Check for a bad get return object type. */ >>+ tree gro_return_type = FUNC_OR_METHOD_TYPE_P (TREE_TYPE (get_ro_meth)) >>+? TREE_TYPE (TREE_TYPE (get_ro_meth)) >>+: TREE_TYPE (get_ro_meth); >Is this to allow get_return_type to be a functio

Re: [PATCH 3/9] RISC-V: Handle 0.0 floating point pattern costing to match const_vector expander

2024-08-23 Thread Patrick O'Neill
On 8/22/24 13:45, Robin Dapp wrote: + /* Constants in range -16 ~ 15 integer or 0.0 floating-point + can be emitted using vmv.v.i. */ + if (satisfies_constraint_vi (x) || satisfies_constraint_Wc0 (x)) return 1; Just a nit but whil

[Committed 1/9] RISC-V: Use encoded nelts when calling repeating_sequence_p

2024-08-23 Thread Patrick O'Neill
On 8/22/24 13:41, Robin Dapp wrote: Before looking at the rest (tomorrow) - this is OK. Committed - thanks! Patrick

Re: [PATCH] ifcvt: Do not overwrite results in noce_convert_multiple_sets [PR116372, PR116405]

2024-08-23 Thread Philipp Tomsich
As reported on https://gcc.gnu.org/bugzilla/show_bug.cgi?id=116372, this change restores bootstrap. Committing as obvious. --Philipp. On Tue, 20 Aug 2024 at 21:57, Manolis Tsamis wrote: > > Now that more operations are allowed for noce_convert_multiple_sets, it is > possible that the same regist

Re: [PATCH] ifcvt: Disallow emitting call instructions in noce_convert_multiple_sets [PR116358]

2024-08-23 Thread Philipp Tomsich
Applied to master, thanks! --Philipp. On Thu, 22 Aug 2024 at 20:30, Jeff Law wrote: > > > > On 8/22/24 5:04 AM, Manolis Tsamis wrote: > > Similar to not allowing jump instructions in the generated code, we also > > shouldn't allow call instructions in noce_convert_multiple_sets. > > In the case

Re: [PATCH] rs6000: Fix PTImode handling in power8 swap optimization pass [PR116415]

2024-08-23 Thread Peter Bergner
On 8/22/24 8:48 PM, Peter Bergner wrote: > On 8/22/24 4:39 AM, Kewen.Lin wrote: >> OK for trunk and all active release branches with/without these nits tweaked, >> but please give others two days or so to comment, thanks! > > I'll make the suggested changes and push them to trunk when my new set o

[PATCH] c++: Fix overeager Woverloaded-virtual with conversion operators [PR109918]

2024-08-23 Thread Simon Martin
We currently emit an incorrect -Woverloaded-virtual warning upon the following test case === cut here === struct A { virtual operator int() { return 42; } virtual operator char() = 0; }; struct B : public A { operator char() { return 'A'; } }; === cut here === The problem is that warn_hidde

Re: [PATCH] late-combine: Preserve INSN_CODE when modifying notes [PR116343]

2024-08-23 Thread Georg-Johann Lay
Am 23.08.24 um 17:45 schrieb Richard Biener: Am 23.08.2024 um 16:49 schrieb Jeff Law : On 8/23/24 6:02 AM, Georg-Johann Lay wrote: Hi, this fails on machines that don't support scheduling: cc1: warning: instruction scheduling not supported on this target machine FAIL: gcc.dg/torture/pr116343.c

[PATCH] MIPS: Include missing mips16.S in libgcc/lib1funcs.S

2024-08-23 Thread YunQiang Su
mips16.S was missing since commit 29b74545531f6afbee9fc38c267524326dbfbedf Date: Thu Jun 1 10:14:24 2023 +0800 MIPS: Add speculation_barrier support Without mips16.S included, some symbols will miss for mips16, and so some software will fail to build. libgcc/ChangeLog: * config/mi

Re: [PATCH] late-combine: Preserve INSN_CODE when modifying notes [PR116343]

2024-08-23 Thread Jeff Law
On 8/23/24 9:45 AM, Richard Biener wrote: Am 23.08.2024 um 16:49 schrieb Jeff Law :  On 8/23/24 6:02 AM, Georg-Johann Lay wrote: Hi, this fails on machines that don't support scheduling: cc1: warning: instruction scheduling not supported on this target machine FAIL: gcc.dg/torture/pr11

Re: [PATCH] late-combine: Preserve INSN_CODE when modifying notes [PR116343]

2024-08-23 Thread Richard Biener
> Am 23.08.2024 um 16:49 schrieb Jeff Law : > >  > >> On 8/23/24 6:02 AM, Georg-Johann Lay wrote: >> >> Hi, this fails on machines that don't support scheduling: >> cc1: warning: instruction scheduling not supported on this target machine >> FAIL: gcc.dg/torture/pr116343.c -O0 (test for e

RE: [RFC][PATCH] AArch64: Remove AARCH64_EXTRA_TUNE_USE_NEW_VECTOR_COSTS

2024-08-23 Thread Tamar Christina
Hi Jennifer, > -Original Message- > From: Jennifer Schmitz > Sent: Friday, August 23, 2024 1:07 PM > To: gcc-patches@gcc.gnu.org > Cc: Richard Sandiford ; Kyrylo Tkachov > > Subject: [RFC][PATCH] AArch64: Remove > AARCH64_EXTRA_TUNE_USE_NEW_VECTOR_COSTS > > This patch removes the AARCH6

Re: [PATCH] late-combine: Preserve INSN_CODE when modifying notes [PR116343]

2024-08-23 Thread Jeff Law
On 8/23/24 6:02 AM, Georg-Johann Lay wrote: Hi, this fails on machines that don't support scheduling: cc1: warning: instruction scheduling not supported on this target machine FAIL: gcc.dg/torture/pr116343.c   -O0  (test for excess errors) Excess errors: cc1: warning: instruction schedulin

[PATCH 4/9 v2] c++, coroutines: Fix handling of early exceptions [PR113773].

2024-08-23 Thread Iain Sandoe
Hi Jason, >>+ tree iarc_m = lookup_member (frame_type, coro_frame_i_a_r_c_id, >>+1, 0, tf_warning_or_error); >>+ tree iarc_x = build_class_member_access_expr (deref_fp, iarc_m, >>NULL_TREE, >>+false, tf_warn

Re: [PATCH v2] tree-optimization/116024 - match.pd: add 4 int-compare simplifications

2024-08-23 Thread Artemiy Volkov
On 8/22/2024 3:15 PM, Richard Biener wrote: > On Wed, 21 Aug 2024, Artemiy Volkov wrote: > >> Hi, >> >> sending a v2 of >> https://gcc.gnu.org/pipermail/gcc-patches/2024-August/659851.html after >> changing variable types in all new testcases from standard to fixed-width. >> >> Could anyo

RE: [PATCH] lto: Don't check obj.found for offload section

2024-08-23 Thread Prathamesh Kulkarni
> -Original Message- > From: H.J. Lu > Sent: Friday, August 23, 2024 6:07 PM > To: gcc-patches@gcc.gnu.org > Cc: Prathamesh Kulkarni ; > richard.guent...@gmail.com > Subject: [PATCH] lto: Don't check obj.found for offload section > > External email: Use caution opening links or attachment

[PATCH 3/9 v3] c++, coroutines: Separate allocator work from the ramp body build.

2024-08-23 Thread Iain Sandoe
>>>http://eel.is/c++draft/dcl.fct.def.coroutine#12 (sentence 2) says " If both >>>a usual deallocation function with only a pointer parameter and a usual >>>deallocation function with both a pointer parameter and a size parameter are >>>found, then the selected deallocation function shall be the

Re: [PATCHv4, expand] Add const0 move checking for CLEAR_BY_PIECES optabs

2024-08-23 Thread Jeff Law
On 8/22/24 9:02 PM, HAO CHEN GUI wrote: Hi Hongtao, 在 2024/8/23 9:47, Hongtao Liu 写道: On Thu, Aug 22, 2024 at 4:06 PM HAO CHEN GUI wrote: Hi Hongtao, 在 2024/8/21 11:21, Hongtao Liu 写道: r15-3058-gbb42c551905024 support const0 operand for movv16qi, please rebase your patch and see if ther

[patch][v2] libgomp.texi: Document OpenMP's Interoperability Routines

2024-08-23 Thread Tobias Burnus
Minor update, mainly because of the 'optional' changes in v3 of the patch https://gcc.gnu.org/pipermail/gcc-patches/2024-August/661313.html The 'optional' affects the omp_get_interop_{int,ptr,str} but also omp_target_memcpy_async, omp_target_memcpy_rect_async got a few words. Additionally, th

Re: [patch][v3] libgomp: Add interop types and routines to OpenMP's headers and module

2024-08-23 Thread Tobias Burnus
v3: Changes: (A) The 'ret_code' arguments of omp_get_interop_{int,ptr,str} are actually 'optional'. That's something that got lost in at some point between OpenMP 5.2 and TR13 (I filed OpenMP spec Issue #4165 for it). When adding it, I noticed that two '…_async' function lacked the '= NULL'

Re: [PATCH] lto: Don't check obj.found for offload section

2024-08-23 Thread Richard Biener
On Fri, Aug 23, 2024 at 2:36 PM H.J. Lu wrote: > > obj.found is the number of LTO symbols. We should include the offload > section when it is used by linker even if there are no LTO symbols. OK. > PR lto/116361 > * lto-plugin.c (claim_file_handler_v2): Don't check obj.found >

[committed] libstdc++: Implement LWG 3746 for std::optional

2024-08-23 Thread Jonathan Wakely
Tested x86_64-linux. Pushed to trunk. -- >8 -- This avoids constraint recursion in operator<=> for std::optional. The resolution was approved in Kona 2022. libstdc++-v3/ChangeLog: * include/std/optional (__is_derived_from_optional): New concept. (operator<=>): Use __is_d

[PATCH] c++: Add most missing C++20 and C++23 names to cxxapi-data.csv

2024-08-23 Thread Jonathan Wakely
Tested x86_64-linux. OK for trunk? -- >8 -- This includes uncommenting the atomic_flag non-member functions, which were added by PR libstdc++/103934. Also generate a hint for std::ignore, which was recently tweaked to be more generally useful by P2968R2, which r15-2324 implemented. gcc/cp/Chang

[committed,v2] libstdc++: Optimize __try_use_facet for const types

2024-08-23 Thread Jonathan Wakely
Tested x86_64-linux. Pushed to trunk. -- >8 -- LWG 436 confirmed that const-qualified types are valid arguments for Facet template parameters (but volatile-qualified types are not). Use the fast path in std::use_facet and std::has_facet for const T as well as T. libstdc++-v3/ChangeLog:

Re: [PATCH v3] Update LDPT_REGISTER_CLAIM_FILE_HOOK_V2 linker plugin hook

2024-08-23 Thread H.J. Lu
On Fri, Aug 23, 2024 at 4:02 AM Prathamesh Kulkarni wrote: > > > > > -Original Message- > > From: Richard Biener > > Sent: Thursday, August 22, 2024 2:16 PM > > To: H.J. Lu > > Cc: gcc-patches@gcc.gnu.org; josmy...@redhat.com > > Subject: Re: [PATCH v3] Update LDPT_REGISTER_CLAIM_FILE_HO

[PATCH] tree-optimization/116463 - complex lowering leaves around dead stmts

2024-08-23 Thread Richard Biener
Complex lowering generally replaces existing complex defs with COMPLEX_EXPRs but those might be dead when it can always refer to components from the lattice. This in turn can pessimize followup transforms like forwprop and reassoc, the following makes sure to get rid of dead COMPLEX_EXPRs generate

[PATCH] lto: Don't check obj.found for offload section

2024-08-23 Thread H.J. Lu
obj.found is the number of LTO symbols. We should include the offload section when it is used by linker even if there are no LTO symbols. PR lto/116361 * lto-plugin.c (claim_file_handler_v2): Don't check obj.found for the offload section. Signed-off-by: H.J. Lu --- lto-

[committed] libstdc++: Make debug sequence members mutable [PR116369]

2024-08-23 Thread Jonathan Wakely
Tested x86_64-linux. Pushed to trunk. -- >8 -- We need to be able to attach debug mode iterators to const containers, so the safe iterator constructor uses const_cast to get a modifiable pointer to the container. If the container was defined as const, that const_cast to access its members results

[committed] libstdc++: Use noexcept insted of throw() in src/c++11/debug.cc

2024-08-23 Thread Jonathan Wakely
Tested x86_64-linux. Pushed to trunk. -- >8 -- libstdc++-v3/ChangeLog: * src/c++11/debug.cc: Replace throw() with noexcept. --- libstdc++-v3/src/c++11/debug.cc | 32 1 file changed, 16 insertions(+), 16 deletions(-) diff --git a/libstdc++-v3/src/c++11/d

Re: [patch,avr] Overhaul avr-ifelse RTL optimization pass

2024-08-23 Thread Richard Biener
On Fri, Aug 23, 2024 at 2:16 PM Georg-Johann Lay wrote: > > This patch overhauls the avr-ifelse mini-pass that optimizes > two cbranch insns to one comparison and two branches. > > More optimization opportunities are realized, and the code > has been refactored. > > No new regressions. Ok for tru

Re: [PATCH] libstdc++: Simplify C++20 implementation of std::variant

2024-08-23 Thread Jonathan Wakely
On Wed, 21 Aug 2024 at 10:03, Jonathan Wakely wrote: > > Tested x86_64-linux. > > This should improve compile times for C++20 and up. > > I need to test this with Clang, but then I plan to push it if all goes > well. It seems to work OK with Clang, so I've pushed it.

[committed] libstdc++: Make std::vector::reference constructor private [PR115098]

2024-08-23 Thread Jonathan Wakely
Tested x86_64-linux. Pushed to trunk. -- >8 -- The standard says this constructor should be private. LWG 4141 proposes to remove it entirely. We still need it, but it doesn't need to be public. For std::bitset the default constructor is already private (and never even defined) but there's a non

[patch,avr] Overhaul avr-ifelse RTL optimization pass

2024-08-23 Thread Georg-Johann Lay
This patch overhauls the avr-ifelse mini-pass that optimizes two cbranch insns to one comparison and two branches. More optimization opportunities are realized, and the code has been refactored. No new regressions. Ok for trunk? There is currently no avr maintainer, so some global reviewer mig

[RFC][PATCH] AArch64: Remove AARCH64_EXTRA_TUNE_USE_NEW_VECTOR_COSTS

2024-08-23 Thread Jennifer Schmitz
This patch removes the AARCH64_EXTRA_TUNE_USE_NEW_VECTOR_COSTS tunable and use_new_vector_costs entry in aarch64-tuning-flags.def and makes the AARCH64_EXTRA_TUNE_USE_NEW_VECTOR_COSTS paths in the backend the default. To that end, the function aarch64_use_new_vector_costs_p and its uses were remove

Re: [pushed] rtl-ssa: Fix removal of order_nodes [PR115929]

2024-08-23 Thread Georg-Johann Lay
Am 16.07.24 um 16:34 schrieb Richard Sandiford: order_nodes are used to implement ordered comparisons between two insns with the same program point number. remove_insn would remove an order_node from its splay tree, but didn't remove it from the insn. This caused confusion if the insn was la

Re: [PATCH] late-combine: Preserve INSN_CODE when modifying notes [PR116343]

2024-08-23 Thread Georg-Johann Lay
Am 15.08.24 um 10:45 schrieb Richard Sandiford: When it removes a definition, late-combine tries to update all uses in notes. It does this using the same insn_propagation class that it uses for patterns. However, insn_propagation uses validate_change, which in turn resets the INSN_CODE. This i

Re: [PATCH v3] Update LDPT_REGISTER_CLAIM_FILE_HOOK_V2 linker plugin hook

2024-08-23 Thread H.J. Lu
On Fri, Aug 23, 2024, 4:02 AM Prathamesh Kulkarni wrote: > > > > -Original Message- > > From: Richard Biener > > Sent: Thursday, August 22, 2024 2:16 PM > > To: H.J. Lu > > Cc: gcc-patches@gcc.gnu.org; josmy...@redhat.com > > Subject: Re: [PATCH v3] Update LDPT_REGISTER_CLAIM_FILE_HOOK_

Re: [RFC/RFA][PATCH v4 06/12] aarch64: Implement new expander for efficient CRC computation

2024-08-23 Thread Richard Biener
On Fri, Aug 23, 2024 at 9:55 AM Mariam Arutunian wrote: > > > On Wed, Aug 21, 2024 at 5:56 PM Richard Sandiford > wrote: >> >> Mariam Arutunian writes: >> > This patch introduces two new expanders for the aarch64 backend, >> > dedicated to generate optimized code for CRC computations. >> > The

RE: [PATCH v3] Update LDPT_REGISTER_CLAIM_FILE_HOOK_V2 linker plugin hook

2024-08-23 Thread Prathamesh Kulkarni
> -Original Message- > From: Richard Biener > Sent: Thursday, August 22, 2024 2:16 PM > To: H.J. Lu > Cc: gcc-patches@gcc.gnu.org; josmy...@redhat.com > Subject: Re: [PATCH v3] Update LDPT_REGISTER_CLAIM_FILE_HOOK_V2 linker > plugin hook > > External email: Use caution opening links or

Re: [PATCH] Don't remove /usr/lib and /lib from when passing to the linker [PR97304/104707]

2024-08-23 Thread Richard Biener
On Fri, Aug 23, 2024 at 9:18 AM Gerald Pfeifer wrote: > > On Thu, 22 Aug 2024, Andrew Pinski wrote: > > With newer ld, the default search library path does not include /usr/lib > > nor /lib but the driver decides to not pass -L down to the link for > > these and then in some/most cases libc is not

Re: [PATCH v1] Vect: Promote unsigned .SAT_ADD constant operand for vectorizable_call

2024-08-23 Thread Richard Biener
On Thu, Aug 22, 2024 at 8:36 PM Jakub Jelinek wrote: > > On Tue, Aug 20, 2024 at 01:52:35PM +0200, Richard Biener wrote: > > On Sat, Aug 17, 2024 at 11:18 PM Jakub Jelinek wrote: > > > > > > On Sat, Aug 17, 2024 at 05:03:14AM +, Li, Pan2 wrote: > > > > Please feel free to let me know if there

Re: [PATCH] libcpp: bump padding size in _cpp_convert_input [PR116458]

2024-08-23 Thread Richard Biener
On Thu, Aug 22, 2024 at 8:25 PM Alexander Monakov wrote: > > The recently introduced search_line_fast_ssse3 raised padding > requirement from 16 to 64, which was adjusted in read_file_guts, > but the corresponding ' + 16' in _cpp_convert_input was overlooked. OK > libcpp/ChangeLog: > > P

Re: [PATCH] Use add_name_and_src_coords_attributes in modified_type_die

2024-08-23 Thread Richard Biener
On Thu, Aug 22, 2024 at 5:04 PM Tom Tromey wrote: > > > "Richard" == Richard Biener writes: > > >> While working on a patch to the Ada compiler, I found a spot in > >> dwarf2out.cc that calls add_name_attribute where a call to > >> add_name_and_src_coords_attributes would be better, because t

Re: [PATCHv4, expand] Add const0 move checking for CLEAR_BY_PIECES optabs

2024-08-23 Thread HAO CHEN GUI
Hi Hongtao, 在 2024/8/23 11:47, Hongtao Liu 写道: > On Fri, Aug 23, 2024 at 11:03 AM HAO CHEN GUI wrote: >> >> Hi Hongtao, >> >> 在 2024/8/23 9:47, Hongtao Liu 写道: >>> On Thu, Aug 22, 2024 at 4:06 PM HAO CHEN GUI wrote: Hi Hongtao, 在 2024/8/21 11:21, Hongtao Liu 写道: > r15-305

Re: [patch][v2a] libgomp: Add interop types and routines to OpenMP's headers and module

2024-08-23 Thread Andre Vehreschild
Oh, and I get compile errors: /mnt/work_store/gcc/gcc.test/libgomp/target.c: In function 'omp_get_interop_type_desc': /mnt/work_store/gcc/gcc.test/libgomp/target.c:5179:30: error: excess elements in scalar initializer [-Werror] 5179 | "const char*", /* fr_name *

Re: [PATCH] Fix test failure on powerpc targets

2024-08-23 Thread Richard Biener
> Am 23.08.2024 um 06:42 schrieb Bernd Edlinger : > > Apparently due to slightly different optimization levels > not always both subroutines have multiple subranges, > but having at least one such, and no lexical blocks > is sufficient to prove that the fix worked. Q.E.D. > So reduce the test

[Fortran, Patch, PR85002, v1] Fix deep-copy of alloc. comps. in coarrays ICEing and crashing w/ lib.

2024-08-23 Thread Andre Vehreschild
Hi all, attached patch fixes an ICE during trans-phase when allocatable components in derived typed coarrays were nested. I am nearly convinced, that the ICE is mostly fixed by pr86468, because I get a slightly different ICE. Nevertheless was the executable crashing with -fcoarray=lib because the

[PATCH] c++: Add testcase for (now fixed) regression [PR113746]

2024-08-23 Thread Simon Martin
The case in PR113746 used to ICE until commit f04dc89a991. This patch simply adds the case to the testsuite. Successfully tested on x86_64-pc-linux-gnu. PR c++/113746 gcc/testsuite/ChangeLog: * g++.dg/parse/crash76.C: New test. --- gcc/testsuite/g++.dg/parse/crash76.C | 6

[COMMITTED 16/16] ada: Fix crash on aliased variable with packed array type and -g switch

2024-08-23 Thread Marc Poulhiès
From: Eric Botcazou This comes from a loophole in gnat_get_array_descr_info for record types containing a template, which represent an aliased array, when this array type is bit-packed and implemented as a modular integer. gcc/ada/ * gcc-interface/misc.cc (gnat_get_array_descr_info): Te

[COMMITTED 13/16] ada: Crash on string interpolation with custom string types

2024-08-23 Thread Marc Poulhiès
From: Javier Miranda The compiler crashes when processing an object declaration of a custom string type initialized with an interpolated string. gcc/ada/ * exp_attr.adb (Expand_N_Attribute_Reference: [Put_Image]): Add support for custom string types. * exp_ch2.adb (Expan

[COMMITTED 11/16] ada: Eliminated-mode overflow check not eliminated

2024-08-23 Thread Marc Poulhiès
From: Steve Baird If the Overflow_Mode in effect is Eliminated, then evaluating an arithmetic op such as addition or subtraction should not fail an overflow check. Fix a bug which resulted in such an overflow check failure. gcc/ada/ * checks.adb (Is_Signed_Integer_Arithmetic_Op): Return

[COMMITTED 14/16] ada: Fix incorrect tracebacks on Windows

2024-08-23 Thread Marc Poulhiès
From: Sebastian Poeplau PECOFF symbols don't have a size attached to them. The symbol size that System.Object_Reader.Read_Symbol guesses to make up for the lack of information can be wrong when the symbol table doesn't match the algorithm's expectations; in particular that's the case when functio

[COMMITTED 07/16] ada: Fix style in lines starting with assignment operator

2024-08-23 Thread Marc Poulhiès
From: Piotr Trojanek Style cleanup; semantics is unaffected. Offending occurrences found with grep "^ *:=" and fixed manually. gcc/ada/ * checks.ads, cstand.adb, exp_aggr.adb, exp_ch4.adb, exp_ch5.adb, exp_dbug.adb, exp_util.adb, gnatlink.adb, lib-util.adb, libgnat/a-exc

[COMMITTED 10/16] ada: Update libraries with the limited flag

2024-08-23 Thread Marc Poulhiès
From: Viljar Indus Records without a limited keyword now emit a warning if they contain a member that has an inherently limited type. gcc/ada/ * libgnat/a-coinho__shared.ads: add limited keyword. * libgnat/g-awk.adb: add limited keyword. * libgnat/g-comlin.ads: add limit

[COMMITTED 12/16] ada: Implicit_Dereference aspect specification for subtype incorrectly accepted

2024-08-23 Thread Marc Poulhiès
From: Steve Baird Implicit_Dereference is a type-specific aspect and therefore cannot be legally specified as part of a subtype declaration. gcc/ada/ * sem_ch13.adb (Analyze_Aspect_Implicit_Dereference): Generate error if an aspect specification specifies the Implicit_De

[COMMITTED 09/16] ada: Emit a warning on inheritly limited types

2024-08-23 Thread Marc Poulhiès
From: Viljar Indus Record types that do not have a limited keyword but have a member with a limited type are also considered to be limited types. This can be confusing to understand for newer Ada users. It is better to emit a warning in this scenario and suggest that the type should be marked wit

[COMMITTED 08/16] ada: First controlling parameter aspect

2024-08-23 Thread Marc Poulhiès
From: Javier Miranda gcc/ada/ * sem_ch6.adb (Check_Private_Overriding): Improve code detecting error on private function with controlling result. Fixes the regression of ACATS bde0003. Tested on x86_64-pc-linux-gnu, committed on master. --- gcc/ada/sem_ch6.adb | 14 +++

[COMMITTED 05/16] ada: Simplify validity checks for scalar parameters

2024-08-23 Thread Marc Poulhiès
From: Piotr Trojanek Replace low-level iteration over formal and actual parameters with a call to high-level Find_Actual routine. Code cleanup; behavior is unaffected. gcc/ada/ * checks.adb (Ensure_Valid): Use Find_Actual. Tested on x86_64-pc-linux-gnu, committed on master. --- gcc/a

[COMMITTED 01/16] ada: First controlling parameter aspect

2024-08-23 Thread Marc Poulhiès
From: Javier Miranda This patch adds support for a new GNAT aspect/pragma that modifies the semantics of dispatching primitives. When a tagged type has this aspect/pragma, only subprograms that have the first parameter of this type will be considered dispatching primitives; this new pragma/aspect

[COMMITTED 15/16] ada: String interpolation: report error without Extensions allowed

2024-08-23 Thread Marc Poulhiès
From: Javier Miranda The compiler does not report the correct error in occurrences of interpolated strings, when the sources are compiled without language extensions allowed. gcc/ada/ * scng.adb (Scan): Call Error_Msg_GNAT_Extension() to report an error, when the sources are com

[COMMITTED 06/16] ada: Cleanup validity of boolean operators

2024-08-23 Thread Marc Poulhiès
From: Piotr Trojanek Move detection of always valid expressions from routine Ensure_Valid (which inserts validity checks) to Expr_Known_Valid (which decides their validity). In particular, this patch removes duplicated detection of boolean operators, which were recognized in both these routines.

[COMMITTED 04/16] ada: Fix validity checks for named parameter associations

2024-08-23 Thread Marc Poulhiès
From: Piotr Trojanek When iterating over actual and formal parameters, we should use First_Actual/Next_Actual and not simply First/Next, because the order of actual parameters might be different than the order of formal parameters obtained with First_Formal/Next_Formal. This patch fixes a glitch

[COMMITTED 02/16] ada: Error missing when 'access is applied to an interface type object

2024-08-23 Thread Marc Poulhiès
From: Javier Miranda The compiler does not report an error when 'access is applied to a non-aliased class-wide interface type object. gcc/ada/ * exp_util.ads (Is_Expanded_Class_Wide_Interface_Object_Decl): New subprogram. * exp_util.adb (Is_Expanded_Class_Wide_Interface_

[COMMITTED 03/16] ada: First controlling parameter aspect

2024-08-23 Thread Marc Poulhiès
From: Javier Miranda gcc/ada/ * sem_ch13.adb (Analyze_One_Aspect): Temporarily remove reporting an error when the new aspect is set to True and the extensions are not enabled. Tested on x86_64-pc-linux-gnu, committed on master. --- gcc/ada/sem_ch13.adb | 3 --- 1 file

Re: [PATCH v5] RISC-V: Enable -gvariable-location-views by default

2024-08-23 Thread Rainer Orth
Richard Biener writes: > On Thu, 22 Aug 2024, Bernd Edlinger wrote: > >> This affects only the RISC-V targets, where the compiler options >> -gvariable-location-views and consequently also -ginline-points >> are disabled by default, which is unexpected and disables some >> useful features of the

[PATCH v3 10/10] fortran: Add -finline-intrinsics flag for MINLOC/MAXLOC [PR90608]

2024-08-23 Thread Mikael Morin
From: Mikael Morin The documentation in this patch was partly reworded, compared to the previous version posted at: https://gcc.gnu.org/pipermail/gcc-patches/2024-August/660607.html The rest of the patch is unchanged, just rebased to a more recent master. Joseph is in CC as I need a ack for the

[PATCH v3 01/10] fortran: Add tests covering inline MINLOC/MAXLOC without DIM [PR90608]

2024-08-23 Thread Mikael Morin
From: Mikael Morin Add the tests covering the various cases for which we are about to implement inline expansion of MINLOC and MAXLOC. Those are cases where the DIM argument is not present. PR fortran/90608 gcc/testsuite/ChangeLog: * gfortran.dg/ieee/maxloc_nan_1.f90: New test

[PATCH v3 08/10] fortran: Inline non-character MINLOC/MAXLOC with no DIM [PR90608]

2024-08-23 Thread Mikael Morin
From: Mikael Morin Enable generation of inline MINLOC/MAXLOC code in the case where DIM is not present, and either ARRAY is of floating point type or MASK is an array. Those cases are the remaining bits to fully support inlining of non-CHARACTER MINLOC/MAXLOC without DIM. They are treated toget

[PATCH v3 03/10] fortran: Inline MINLOC/MAXLOC with no DIM and ARRAY of rank 1 [PR90608]

2024-08-23 Thread Mikael Morin
From: Mikael Morin Enable inline code generation for the MINLOC and MAXLOC intrinsic, if the DIM argument is not present and ARRAY has rank 1. This case is similar to the case where the result is scalar (DIM present and rank 1 ARRAY), which already supports inline expansion of the intrinsic. Bo

[PATCH v3 06/10] fortran: Inline integral MINLOC/MAXLOC with no DIM and no MASK [PR90608]

2024-08-23 Thread Mikael Morin
From: Mikael Morin Enable generation of inline code for the MINLOC and MAXLOC intrinsic, if the ARRAY argument is of integral type and of any rank (only the rank 1 case was previously inlined), and neither DIM nor MASK arguments are present. This needs a few adjustments in gfc_conv_intrinsic_min

[PATCH v3 09/10] fortran: Continue MINLOC/MAXLOC second loop where the first stopped [PR90608]

2024-08-23 Thread Mikael Morin
From: Mikael Morin Continue the second set of loops where the first one stopped in the generated inline MINLOC/MAXLOC code in the cases where the generated code contains two sets of loops. This fixes a regression that was introduced when enabling the generation of inline MINLOC/MAXLOC code with

[PATCH v3 02/10] fortran: Disable frontend passes for inlinable MINLOC/MAXLOC [PR90608]

2024-08-23 Thread Mikael Morin
From: Mikael Morin Disable rewriting of MINLOC/MAXLOC expressions for which inline code generation is supported. Update the gfc_inline_intrinsic_function_p predicate (already existing) for that, with the current state of MINLOC/MAXLOC inlining support, that is only the cases of a scalar result a

[PATCH v3 05/10] fortran: Outline array bound check generation code

2024-08-23 Thread Mikael Morin
From: Mikael Morin The next patch will need reindenting of the array bound check generation code. This outlines it to its own function beforehand, reducing the churn in the next patch. -- >8 -- gcc/fortran/ChangeLog: * trans-array.cc (gfc_conv_ss_startstride): Move array bound check

[PATCH v3 07/10] fortran: Inline integral MINLOC/MAXLOC with no DIM and scalar MASK [PR90608]

2024-08-23 Thread Mikael Morin
From: Mikael Morin Enable the generation of inline code for MINLOC/MAXLOC when argument ARRAY is of integral type, DIM is not present, and MASK is present and is scalar (only absent MASK or rank 1 ARRAY were inlined before). Scalar masks are implemented with a wrapping condition around the code

[PATCH v3 04/10] fortran: Remove MINLOC/MAXLOC frontend optimization

2024-08-23 Thread Mikael Morin
From: Mikael Morin Remove the frontend pass rewriting calls of MINLOC/MAXLOC without DIM to calls with one-valued DIM enclosed in an array constructor. This transformation was circumventing the limitation of inline MINLOC/MAXLOC code generation to scalar cases only, allowing inline code to be ge

[PATCH v3 00/10] fortran: Inline MINLOC/MAXLOC without DIM argument [PR90608]

2024-08-23 Thread Mikael Morin
From: Mikael Morin Hello, this is the third version of the inline MINLOC/MAXLOC without DIM patchset whose second version was posted before at: https://gcc.gnu.org/pipermail/gcc-patches/2024-August/660599.html Compared to the previous version, it contains a change of wording of the documentatio

Re: [patch][v2a] libgomp: Add interop types and routines to OpenMP's headers and module

2024-08-23 Thread Andre Vehreschild
Hi Tobias, I just had a short look at your PR. Besides that it did not git-am for me (see below), I have only one question (see also below). Please note, that I have only user-level experience in OpenMP and can say nothing about completeness or soundness of your PR. I hope that a first check on ov

[pushed] fortran: Minor fix to -ffrontend-optimize description (was: typo on homepage)

2024-08-23 Thread Gerald Pfeifer
On Mon, 8 Apr 2024, Johannes Nendwich via Gcc wrote: > on https://gcc.gnu.org/onlinedocs/gfortran/Code-Gen-Options.html > there is at the end the part > >-ffrontend-optimize > >This option performs front-end optimization, based on manipulating > parts the Fortran parse tree. > > Migh

Re: [RFC/RFA][PATCH v4 06/12] aarch64: Implement new expander for efficient CRC computation

2024-08-23 Thread Mariam Arutunian
On Wed, Aug 21, 2024 at 5:56 PM Richard Sandiford wrote: > Mariam Arutunian writes: > > This patch introduces two new expanders for the aarch64 backend, > > dedicated to generate optimized code for CRC computations. > > The new expanders are designed to leverage specific hardware capabilities >

Re: [PATCH 1/3] gcov: Cache source files

2024-08-23 Thread Jørgen Kvalsvik
On 8/23/24 09:39, Jan Hubicka wrote: Hi, 1:4:int notmain(const char *entity) -: == inlined from hello.h == 1:6: if (s) branch 0 taken 0 (fallthrough) branch 1 taken 1 #:7:printf ("hello, %s!\n", s); %:7-block 3 call0 never e

Re: [Fortran, Patch, PR86468, v1] Follow up: Remove obsolete VIEW_CONVERT

2024-08-23 Thread Andre Vehreschild
Hi Steve, thanks for the ok. Committed as gcc-15-3099-g0636de8c520 Thanks again, Andre On Wed, 21 Aug 2024 09:31:55 -0700 Steve Kargl wrote: > On Wed, Aug 21, 2024 at 12:17:46PM +0200, Andre Vehreschild wrote: > > > > attached small patch removes a VIEW_CONVERT that I erroneously inser

[wwwdocs,PATCH] readings: Add ANSI C89 (was: C89 question: Do we need to accept -Wint-conversion warnings)

2024-08-23 Thread Gerald Pfeifer
[ gcc@ -> gcc-patches@ ] On Tue, 10 Oct 2023, Joseph Myers wrote: > Implicit conversions between pointers and integers are not valid C89. > > ANSI C89, as adopted as FIPS PUB 160, is available from NIST: > https://nvlpubs.nist.gov/nistpubs/Legacy/FIPS/fipspub160.pdf Thanks, Joseph. I added this

Re: [PATCH 1/4] testsuite: Use dg-compile, not gcc -c

2024-08-23 Thread Jan Hubicka
> Since this is a pure compile test it makes sense to inform dejagnu of > it. > > gcc/testsuite/ChangeLog: > > * gcc.misc-tests/gcov-23.c: Use dg-compile, not gcc -c OK, Honza > --- > gcc/testsuite/gcc.misc-tests/gcov-23.c | 3 ++- > 1 file changed, 2 insertions(+), 1 deletion(-) > > dif

Re: [PATCH 1/3] gcov: Cache source files

2024-08-23 Thread Jan Hubicka
Hi, > 1:4:int notmain(const char *entity) > -: == inlined from hello.h == > 1:6: if (s) > branch 0 taken 0 (fallthrough) > branch 1 taken 1 > #:7:printf ("hello, %s!\n", s); > %:7-block 3 > call0 never executed > -:8: e

Ping [PATCH 0/4] Prime path coverage in gcc/gcov

2024-08-23 Thread Jørgen Kvalsvik
Ping. On 8/15/24 10:15, Jørgen Kvalsvik wrote: Ping. Since the last patch I have fixed a few bugs in the path count limit aborting, and a few minor rephrases in docs. Jørgen Kvalsvik (4): testsuite: Use dg-compile, not gcc -c gcov: Cache source files gcov: branch, conds, calls in funct

Re: [PATCH] Don't remove /usr/lib and /lib from when passing to the linker [PR97304/104707]

2024-08-23 Thread Gerald Pfeifer
On Thu, 22 Aug 2024, Andrew Pinski wrote: > With newer ld, the default search library path does not include /usr/lib > nor /lib but the driver decides to not pass -L down to the link for > these and then in some/most cases libc is not found. > This code dates from at least 1992 and it is done in

  1   2   >