[PATCH] bitintlower: Handle PAREN_EXPR [PR117459]

2024-11-18 Thread Jakub Jelinek
Hi! The following patch handles PAREN_EXPR in bitint lowering, and handles it as an optimization barrier, so that temporary arithmetics from PAREN_EXPR isn't mixed with temporary arithmetics from outside of the PAREN_EXPR. Bootstrapped/regtested on x86_64-linux and i686-linux, ok for trunk? 2024

[PATCH v1 2/2] RISC-V: Remove unnecessary option for all other scalar SAT_* testcase

2024-11-18 Thread pan2 . li
From: Pan Li After we create a isolated folder to hold all SAT scalar test, we have fully control of what optimization options passing to the testcase. Thus, it is better to remove the unnecessary work around for flto option, as well as the -O3 option for each cases. The riscv.exp will pass sor

Re: [PATCH v2 4/8] gimple: Handle variable-sized vectors in BIT_FIELD_REF

2024-11-18 Thread Tejas Belagod
On 11/18/24 6:58 PM, Richard Sandiford wrote: Tejas Belagod writes: Handle variable-sized vectors for BIT_FIELD_REF canonicalization. gcc/ChangeLog: * gimple-fold.cc (maybe_canonicalize_mem_ref_addr): Handle variable sized vector types in BIT_FIELD_REF canonicalization.

[PATCH] c: Fix up __builtin_stdc_rotate_{left,right} lowering [PR117456]

2024-11-18 Thread Jakub Jelinek
Hi! Apparently the middle-end/expansion can only handle {L,R}ROTATE_EXPR on types with mode precision, or large/huge BITINT_TYPE. So, the following patch uses the rotate exprs only in those cases where it can be handled, and emits code with shifts/ior otherwise. As types without mode precision inc

[PATCH] bitintlower: Handle EXACT_DIV_EXPR like TRUNC_DIV_EXPR in bitint lowering [PR117571]

2024-11-18 Thread Jakub Jelinek
Hi! r15-4601 added match.pd simplification of some TRUNC_DIV_EXPR expressions into EXACT_DIV_EXPR, so bitintlower can now encounter even those. >From bitint lowering POV the fact that the division will be exact doesn't matter, we still need to call at runtime the __divmodbitint4 API and it wouldn'

[PATCH] Avoid repeated calls to temporarily_undo_changes [PR117297]

2024-11-18 Thread Richard Sandiford
In an attempt to reduce compile time, rtl-ssa computes the cost of existing instructions lazily rather than eagerly. However, this means that it might need to calculate the cost of an existing instruction while a change group is already in progress for the instruction. rtl_ssa::insn_info::calcula

PING Re: [PATCH] testsuite: add print-stack.exp

2024-11-18 Thread David Malcolm
Ping for this testsuite patch; I've occasionally found it *very* helpful when debugging DejaGnu. Dave On Wed, 2024-07-31 at 20:51 -0400, David Malcolm wrote: > I wrote this support file to help me debug Tcl issues in the > testsuite. > > Adding a call to: > >   print_stack_backtrace > > somewh

[Patch] libgomp/plugin/plugin-gcn.c: async-queue init - fix function-return type and fail fatally

2024-11-18 Thread Tobias Burnus
This fixes a C23 error, causing a build fail: 'false' should have been 'NULL'. The NULL value is not really handled as the code calling maybe_init_omp_async assumes that agent->omp_async_queue can be dereferenced. Hence, besides fixing the false/NULL issue, it switches to a 'fatal' error. Comme

Re: [PATCH 2/2] Flatten anonymous structs in CodeView types

2024-11-18 Thread Jeff Law
On 11/17/24 9:01 AM, Mark Harmstone wrote: If a CodeView struct, class, or union has as a member an anonymous struct, class, or union, this gets flattened. The sub-struct's members will appear as if they were part of their parent. For this, we move part of get_type_num_struct into a new funct

Re: [Patch] libgomp/plugin/plugin-gcn.c: async-queue init - fix function-return type and fail fatally

2024-11-18 Thread Tobias Burnus
Committed r15-5392-g884637b6362391 (as attached) Albeit with a minor comment change as my new comment was slightly misleading. Tobias Burnus wrote: This fixes a C23 error, causing a build fail: 'false' should have been 'NULL'. The NULL value is not really handled as the code calling maybe_in

GCC 15.0.0 Status Report (2024-11-18), Stage 3 in effect NOW

2024-11-18 Thread Richard Biener
Status == The GCC development branch which will become GCC 15 is now in stage3, open for general bugfixing. Quality Data Priority # Change from last report --- --- P1 26- 5 P2 636+ 15 P3

Remove redundant calls to deterministic functions

2024-11-18 Thread Jan Hubicka
Last year I made modref to track which functions are deterministic - i.e. they produce same effects given same inputs (including memory) and which functions have no side effects (which includes infinite loops, trapping etc.). deterministic functions can be CSEed just as looping pure/const. These a

[PATCH 00/15] Fix data races with sub-longword accesses on Alpha

2024-11-18 Thread Maciej W. Rozycki
Hi, This has come out of a discussion[1] around the removal of non-BWX Alpha support from the Linux kernel due to data races affecting RCU algorithms. As it happens these data races also apply to BWX Alpha systems, as I have discovered in the course of this effort, although owing to how the

[COMMITTED 01/14] ada: Tweak test for predefined main unit

2024-11-18 Thread Marc Poulhiès
From: Ronan Desplanques This change is part of an effort to reduce usage of Is_Predefined_Filename. gcc/ada/ChangeLog: * frontend.adb (Frontend): tweak test for predefined main unit. Tested on x86_64-pc-linux-gnu, committed on master. --- gcc/ada/frontend.adb | 4 +--- 1 file changed

[COMMITTED 10/14] ada: Fix another minor fallout of previous changes to aggregate expansion

2024-11-18 Thread Marc Poulhiès
From: Eric Botcazou The processing of static array aggregates in Exp_Aggr requires that their bounds be representable as Int(eger) values for practical purposes, and the previous changes have exposed another path where this is not checked. This introduces a UI_Are_In_Int_Range local predicate fo

[COMMITTED 02/14] ada: Crash on 'Access for Stream_Element_Array object

2024-11-18 Thread Marc Poulhiès
From: squirek This patch fixes a crash in the compiler when the actual for an anonymous access type formal is an 'Access of a Sream_Element_Array object during the calculation of said actual's accessibility level. gcc/ada/ChangeLog: * accessibility.adb (Accessibility_Level): Handle the

[COMMITTED 05/14] ada: Further cleanup in expansion of array aggregates in allocators

2024-11-18 Thread Marc Poulhiès
From: Eric Botcazou This mainly decouples the handling of the allocator case from that of the assignment case in Expand_Array_Aggregate and also makes Must_Slide a bit more forgiving. gcc/ada/ChangeLog: * exp_aggr.adb (In_Place_Assign_OK): Remove handling of allocators and call

[COMMITTED 03/14] ada: Constraint error not raised in ACATS test c413007

2024-11-18 Thread Marc Poulhiès
From: Javier Miranda Reverse the meaning of switch -gnatd_P; that is, enable by default the generating of a runtime check when the prefix of the call is an access-to-subprogram type with a null value. gcc/ada/ChangeLog: * sem_res.adb (Resolve_Actuals): Add by default a null-exclusion

[pushed] libstdc++: Update reference to Angelika Langer's article

2024-11-18 Thread Gerald Pfeifer
Pushed. Gerald libstdc++-v3: * doc/xml/manual/allocator.xml: Update reference to Angelika Langer's article. * doc/html/manual/memory.html: Regenerate. --- libstdc++-v3/doc/html/manual/memory.html | 2 +- libstdc++-v3/doc/xml/manual/allocator.xml | 2 +- 2 files changed,

Re: [PATCH 1/3] diagnostics: add support for nested diagnostics [PR116253]

2024-11-18 Thread David Malcolm
On Tue, 2024-11-12 at 09:02 -0500, David Malcolm wrote: > Previously the diagnostic subsystem supported a one-deep > hierarchy via auto_diagnostic_group, for associating > notes with the warning/error they annotate; this only > affects SARIF output, not text output. > > This patch adds support to

PING^2: Re: [PATCH] selftest: invoke "diff" when ASSERT_STREQ fails

2024-11-18 Thread David Malcolm
Another ping for this patch; any pex experts out there? Thanks! Dave On Wed, 2024-05-29 at 17:06 -0400, David Malcolm wrote: > On Wed, 2024-05-29 at 16:35 -0400, Eric Gallager wrote: > > On Tue, May 28, 2024 at 1:21 PM David Malcolm > > wrote: > > > > > > Ping. > > > > > > This patch has actua

Re: Should -fsanitize=bounds support counted-by attribute for pointers inside a structure?

2024-11-18 Thread Qing Zhao
> On Nov 18, 2024, at 13:10, Martin Uecker wrote: > > Am Montag, dem 18.11.2024 um 17:55 + schrieb Qing Zhao: >> Hi, >> >> I am working on extending “counted_by” attribute to pointers inside a >> structure per our previous discussion. >> >> I need advice on the following question: >> >

[RFA] Fix csky and c6x build failures

2024-11-18 Thread Jeff Law
csky fails to build libgcc after the c23 changes because it has a typedef for bool. AFAICT it's internal to the file, so removing the typedef isn't an ABI change. Similiarly for c6x which includes unwind-arm-common.inc. I suspect most, if not all of the arm-v7 and older targets are failing

Re: [PATCH] s390: Add expander for uaddc/usubc optabs

2024-11-18 Thread Andreas Krebbel
Hi Stefan, On 11/12/24 10:35, Stefan Schulze Frielinghaus wrote: + rtx cond = gen_rtx_LTU (mode, gen_rtx_REG (CCL1mode, CC_REGNUM), const0_rtx); + if (operands[4] == const0_rtx) +emit_insn (gen_add3_carry1_cc (operands[0], operands[2], operands[3])); + else If we would just generate t

Re: [PATCH 13/15] IRA+LRA: Let the backend request to split basic blocks

2024-11-18 Thread Richard Sandiford
"Maciej W. Rozycki" writes: > The next change for Alpha will produce extra labels and branches in > reload, which in turn requires basic blocks to be split at completion. > We do this already for functions that can trap, so just extend the > arrangement with a flag for the backend to use whenev

Ping: [PATCH] c++: Allow overloaded builtins to be used in SFINAE context

2024-11-18 Thread Matthew Malcomson
Ping 2 On 10/21/24 11:43, Matthew Malcomson wrote: External email: Use caution opening links or attachments Ping (re-sending ping because previous message body too large for list -- apologies for duplication to those on Cc). Attaching update on testsuite to fix testism on Arm that Linaro CI ca

Re: [PATCH v2 0/8] aarch64: Enable C/C++ operations on SVE ACLE types.

2024-11-18 Thread Richard Sandiford
Tejas Belagod writes: > Hi, > > This is v2 of the series > https://gcc.gnu.org/pipermail/gcc-patches/2024-November/667743.html > > based on review comments. Changes in this version include: > > 1. Canonicalised all index ranges for VLAs to BIT_FIELD_REF. > 2. Added more initialization error test

Re: [Patch] libgomp/plugin/plugin-gcn.c: async-queue init - fix function-return type and fail fatally

2024-11-18 Thread Andrew Stubbs
On 11/18/24 13:23, Tobias Burnus wrote: This fixes a C23 error, causing a build fail: 'false' should have been 'NULL'. The NULL value is not really handled as the code calling maybe_init_omp_async assumes that agent->omp_async_queue can be dereferenced. Hence, besides fixing the false/NULL issu

Re: [PATCH] Fix test failures for enum-alias-{1,2,3} on arm-eabi [PR117419]

2024-11-18 Thread Richard Earnshaw (lists)
On 12/11/2024 17:30, Martin Uecker wrote: > > I added a max element as suggested by Richard to force > the type to an int. > > Regression tested on x86_64 but needs testing on arm-eabi. > > Thiago, could you test this? > > https://linaro.atlassian.net/browse/GNU-1224 > > > Fix test failur

Re: [PATCH] libstdc++: Add --enable-clocale=ieee_1003.1-2008 [PR57585]

2024-11-18 Thread Jonathan Wakely
On Mon, 18 Nov 2024 at 10:26, Rainer Orth wrote: > > Hi Jonathan, > > > Do we want something like this for GCC 15? > > That would be good indeed, as the default on both Solaris 11.4 and, if > possible, versions of AIX where it works, too. > > > Tested x86_64-freebsd and sparc-solaris (although not

Re: [PATCH] libstdc++: Add debug assertions to std::list and std::forward_list

2024-11-18 Thread Marc Glisse
On Sat, 16 Nov 2024, Jonathan Wakely wrote: void _M_erase(iterator __position) _GLIBCXX_NOEXCEPT { + if (__builtin_expect(empty(), 0)) + { + __glibcxx_requires_nonempty(); + return; + } Hmm, I'm having second thoughts about the "re

Re: [PATCH 00/15] Fix data races with sub-longword accesses on Alpha

2024-11-18 Thread Maciej W. Rozycki
On Mon, 18 Nov 2024, Arnd Bergmann wrote: > > This patch series addresses these issues in the last two changes, having > > made generic test suite updates to improve coverage in the concerned area > > first and then having addressed a bunch of issues in the code affected I > > discovered in th

Re: Remove redundant calls to deterministic functions

2024-11-18 Thread Richard Biener
On Mon, 18 Nov 2024, Jan Hubicka wrote: > > I don't think we handle > > > > mem = foo (); > > Hmm, we can't > struct val {int a,b;}; > > [[gnu::noinline]] > struct val dup(int *a) > { > a[0]=a[1]; > struct val ret; > ret.a = a[2]; > ret.b = a[3]; > retur

Re: [RFA] Fix csky and c6x build failures

2024-11-18 Thread Richard Earnshaw (lists)
On 17/11/2024 23:38, Jeff Law wrote: > > csky fails to build libgcc after the c23 changes because it has a typedef for > bool.  AFAICT it's internal to the file, so removing the typedef isn't an ABI > change. > > Similiarly for c6x which includes unwind-arm-common.inc.  I suspect most, if > no

Re: *PING* [PATCH 0/7] fortran: Inline MINLOC/MAXLOC with DIM [PR90608]

2024-11-18 Thread Steve Kargl
On Fri, Nov 01, 2024 at 01:01:39PM +0100, Mikael Morin wrote: > Le 30/10/2024 à 23:00, Harald Anlauf a écrit : > > > > given that Jakub changed lots of whitespace in r15-4624-g50332a4fdd3243, > > you may want to rebase your patches onto HEAD of trunk. > > > > May I also suggest to attach the patc

Re: [PATCH] Add -f{,no-}assume-sane-operators-new-delete{,={0,1,2}} options [PR110137]

2024-11-18 Thread Eric Gallager
On Fri, Nov 15, 2024 at 11:08 AM Jakub Jelinek wrote: > > Hi! > > The following patch adds a new tristate option for optimizations related to > replaceable global operators new/delete. > The option isn't called -fassume-sane-operator-new (which clang++ > implements), because > 1) clang++ option me

[COMMITTED 06/14] ada: Cleanup in expansion of array aggregates in object declarations

2024-11-18 Thread Marc Poulhiès
From: Eric Botcazou This mainly decouples the handling of the declaration case from that of the assignment case in Expand_Array_Aggregate, as well as moves the expansion in the case of an aggregate that can be processed by the back end to the Build_Array_Aggr_Code routine. gcc/ada/ChangeLog:

[COMMITTED 09/14] ada: Fix minor fallout of previous changes to aggregate expansion

2024-11-18 Thread Marc Poulhiès
From: Eric Botcazou The problem occurs for an anonymous array object declared with an aspect and when pragma {Initialize,Normalize}_Scalars is in effect: in this case, the synthesized aggregate is attached to the Initialization_Statements field by Convert_Aggr_In_Object_Decl, but Explode_Initiali

[COMMITTED 14/14] ada: Fix interaction of aspect Predicate and static case expressions

2024-11-18 Thread Marc Poulhiès
From: Eric Botcazou The semantics of the GNAT-specific Predicate aspect should be equivalent to those of the Static_Predicate aspect when the predicate expression is static, but that is not correctly implemented for static case expressions. gcc/ada/ChangeLog: * exp_ch4.adb (Expand_N_Cas

[COMMITTED 07/14] ada: Array aggregate with large static bounds causes compiler crash

2024-11-18 Thread Marc Poulhiès
From: Steve Baird In some cases an array aggregate with statically known bounds and at least one bound outside of the range of a 32-bit signed integer causes a bugbox. gcc/ada/ChangeLog: * exp_aggr.adb (Convert_To_Positional.Flatten): Avoid raising Constraint_Error in UI_To_Int

[COMMITTED 12/14] ada: Fix small oversight in removal of N_Unchecked_Expression node

2024-11-18 Thread Marc Poulhiès
From: Eric Botcazou In addition to Resolve_Indexed_Component, Eval_Indexed_Component can also set the Do_Range_Check flag on the expressions of an N_Indexed_Component node through the call on Check_Non_Static_Context, so this also needs to be blocked by the Kill_Range_Check flag. gcc/ada/ChangeL

[COMMITTED 11/14] ada: Fix another minor fallout of previous changes to aggregate expansion

2024-11-18 Thread Marc Poulhiès
From: Eric Botcazou This is another glitch associated with Initialization_Statements. gcc/ada/ChangeLog: * exp_util.adb (Remove_Init_Call): Rewrite a compound statement in the Initialization_Statements of the variable as a null statement instead of removing it. *

Re: [PATCH] Allow limited extended asm at toplevel [PR41045]

2024-11-18 Thread Richard Biener
On Sat, 2 Nov 2024, Jakub Jelinek wrote: > Hi! > > Here is a new version of the toplevel asm PR41045 patch, not yet > with the new constraints for symbol definitions (I intend to > deal with that in a follow-up). > Compared to the last patch, this one has some testcases added > and some ICEs rela

Re: [PATCH] ranger, v2: Handle nonnull_if_nonzero attribute [PR117023]

2024-11-18 Thread Andrew MacLeod
Attached is a pre-approved patch which adds a range_query to the inferred range mechanism. The only change you will need to make is to replace "get_range_query (cfun)->"  with "q->" which is passed in. This regstraps on x86 without your patch, and I got as far as a bootstrap with your patche

Re: [PATCH] [RFC] Move VUSE and VDEF into gimple_ops array

2024-11-18 Thread Richard Biener
On Tue, 5 Nov 2024, Jakub Jelinek wrote: > On Tue, Nov 05, 2024 at 01:43:53PM +0100, Richard Biener wrote: > > The following moves the two virtual operands into the gimple_ops > > array, thereby allowing those to be allocated on-demand. In > > particular the patch goes the simple route never allo

Re: [PATCH] match: Fix the `max==0` pattern for pointers [PR117646]

2024-11-18 Thread Richard Biener
On Mon, Nov 18, 2024 at 8:56 AM Andrew Pinski wrote: > > For pointers I forgot that BIT_IOR_EXPR is not valid so when > I added the pattern to convert `max != 0` (r15-5356), GCC > would start to ICEing saying pointer types were not valid for > BIT_IOR_EXPR. > This fixes the problem by casting to t

Re: [PATCH v1] autoupdate: replace obsolete macros in libiberty

2024-11-18 Thread Eric Gallager
On Mon, Nov 18, 2024 at 7:05 AM Matthieu Longo wrote: > > Autoreconf-2.72 warns about obsolete macros. This patch aims at removing > the noise from a future upgrade to autoreconf-2.72 or later. This is in > no a way a complete patch allowing the upgrade to autoreconf-2.72. > Hi, thanks for doing

Re: [PATCH] Add -f{,no-}assume-sane-operators-new-delete{,={0,1,2}} options [PR110137]

2024-11-18 Thread Jakub Jelinek
On Mon, Nov 18, 2024 at 01:29:02PM -0500, Eric Gallager wrote: > > The patch below makes the clang++ behavior the default (i.e. pure-ish > > operator new/delete when called from new/delete expressions, no assumptions > > when called directly) and adds options to override this behavior in both > > d

Re: [PATCH v2] contrib/: Configure git-format-patch(1) to add To: gcc-patches@gcc.gnu.org

2024-11-18 Thread Eric Gallager
On Wed, Nov 13, 2024 at 6:48 AM Alejandro Colomar wrote: > > Hi Eric, > > On Thu, Oct 17, 2024 at 03:20:11PM GMT, Eric Gallager wrote: > > On Thu, Oct 17, 2024 at 10:54 AM Alejandro Colomar wrote: > > > > > > Just like we already do for git-send-email(1). In some cases, patches > > > are prepare

Re: [patch,avr] PR84211: Add a new post reload optimization pass

2024-11-18 Thread Denis Chertykov
вс, 17 нояб. 2024 г. в 21:23, Georg-Johann Lay : > > Am 17.11.24 um 17:01 schrieb Denis Chertykov: > > вс, 17 нояб. 2024 г. в 18:42, Georg-Johann Lay : > >> > >> This introduces a new post reload pass that tracks known values held > >> in registers and performs optimizations based on that knowledge

[PATCH v2 1/8] aarch64: Fix ACLE macro __ARM_FEATURE_SVE_VECTOR_OPERATORS

2024-11-18 Thread Tejas Belagod
This patch enables ACLE macro __ARM_FEATURE_SVE_VECTOR_OPERATORS to indicate that C/C++ language operations are available natively on SVE ACLE types. gcc/ChangeLog: * config/aarch64/aarch64-c.cc (aarch64_update_cpp_builtins): Define __ARM_FEATURE_SVE_VECTOR_OPERATORS. --- gcc/con

Re: [PATCH v2 2/4] vect: disable multiple calls of poly simdclones

2024-11-18 Thread Victor Do Nascimento
On 11/5/24 07:39, Richard Biener wrote: On Tue, 5 Nov 2024, Victor Do Nascimento wrote: The current codegen code to support VF's that are multiples of a simdclone simdlen rely on BIT_FIELD_REF to create multiple input vectors. This does not work for non-constant simdclones, so we should disabl

[COMMITTED 13/14] ada: Atomic_Synchronization is not a user-visible check

2024-11-18 Thread Marc Poulhiès
From: Bob Duff Remove all user-level documentation of the check name "Atomic_Synchronization". The documentation was confusing because this check should never be used in source code, and because it raises the question of whether All_Checks applies to it (it does not). Change the name Atomic_Sync

[committed][RISC-V][PR target/117595] Fix bogus use of simplify_gen_subreg

2024-11-18 Thread Jeff Law
And stage3 begins... Zdenek's fuzzer caught this one. Essentially using simplify_gen_subreg directly with an offset of 0 when we just needed a lowpart. The offset of 0 works for little endian, but for big endian it's simply wrong. simplify_gen_subreg will return NULL_RTX because the case is

[COMMITTED 08/14] ada: Small cleanup and refactoring in expansion of asynchronous select

2024-11-18 Thread Marc Poulhiès
From: Eric Botcazou The exception handler that catches Abort_Signal does nothing nowadays. This refactors the code to use Build_Abort_Block more consistently and also makes it simpler by dropping the identifier on the abort block. No functional changes. gcc/ada/ChangeLog: * exp_sel.ads

Should -fsanitize=bounds support counted-by attribute for pointers inside a structure?

2024-11-18 Thread Qing Zhao
Hi, I am working on extending “counted_by” attribute to pointers inside a structure per our previous discussion. I need advice on the following question: Should -fsantize=bounds support array reference that was referenced through a pointer that has counted_by attribute? For the following sm

Re: [PATCH] testsuite: arm: Require 16-bit float support

2024-11-18 Thread Christophe Lyon
Hi Torbjörn, On 11/18/24 10:37, Torbjorn SVENSSON wrote: On 2024-11-08 20:37, Torbjorn SVENSSON wrote: On 2024-11-08 12:24, Richard Earnshaw (lists) wrote: On 05/11/2024 20:06, Torbjörn SVENSSON wrote: Based on how these functions are used in test cases, I think it's correct to require

[PATCH] Fix incorrect line numbers in large files bug#108900

2024-11-18 Thread Jeremy Bettis
Patch to fix known bug from https://gcc.gnu.org/bugzilla/show_bug.cgi?id=108900 diff -ur gcc-clean/gcc-14.2.0/libcpp/files.cc gcc-14.2.0/libcpp/files.cc --- gcc-clean/gcc-14.2.0/libcpp/files.cc 2024-08-01 08:17:17.0 + +++ gcc-14.2.0/libcpp/files.cc 2024-10-18 18:42:42.293245597 + @

[PATCH v2 2/8] aarch64: Make C/C++ operations possible on SVE ACLE types.

2024-11-18 Thread Tejas Belagod
This patch changes the TYPE_INDIVISBLE flag to 0 to enable SVE ACLE types to be treated as GNU vectors and have the same semantics with operations that are defined on GNU vectors. gcc/ChangeLog: * config/aarch64/aarch64-sve-builtins.cc (register_builtin_types): Flip TYPE_INDIVISBL

Re: Should -fsanitize=bounds support counted-by attribute for pointers inside a structure?

2024-11-18 Thread Martin Uecker
Am Montag, dem 18.11.2024 um 17:55 + schrieb Qing Zhao: > Hi, > > I am working on extending “counted_by” attribute to pointers inside a > structure per our previous discussion. > > I need advice on the following question: > > Should -fsantize=bounds support array reference that was referen

[PATCH RFC] c++: standard dialects and the module repo

2024-11-18 Thread Jason Merrill
-- 8< -- By default, G++ puts compiled modules into a gcm.cache subdirectory of the current working directory. But compiled modules are specific to a particular dialect; if the libstdc++ testsuite wants to run tests in multiple dialects, it needs multiple gcms, and they can't all have the same pa

Re: [PATCH] c: Introduce -Wfree-labels

2024-11-18 Thread Eric Gallager
On Fri, Nov 15, 2024 at 3:12 PM Jakub Jelinek wrote: > > On Fri, Nov 15, 2024 at 08:13:28PM +0100, Florian Weimer wrote: > > * Andrew Pinski: > > > > > On Fri, Nov 15, 2024 at 9:13 AM Florian Weimer wrote: > > >> > > >> This is another recent GCC extension whose use is apparently > > >> difficult

Re: [PATCH] libstdc++: Add debug assertions to std::list and std::forward_list

2024-11-18 Thread François Dumont
On 16/11/2024 02:18, Jonathan Wakely wrote: On Sat, 16 Nov 2024 at 01:09, Jonathan Wakely wrote: While working on fancy pointer support for the linked lists I noticed they didn't have any debug assertions. This adds the obvious non-empty assertions to front(), back(), pop_front() and pop_back

Re: [committed][RISC-V][PR target/117595] Fix bogus use of simplify_gen_subreg

2024-11-18 Thread Patrick O'Neill
On 11/18/24 09:57, Jeff Law wrote: And stage3 begins... Zdenek's fuzzer caught this one.  Essentially using simplify_gen_subreg directly with an offset of 0 when we just needed a lowpart. The offset of 0 works for little endian, but for big endian it's simply wrong.  simplify_gen_subreg wil

Re: [committed][RISC-V][PR target/117595] Fix bogus use of simplify_gen_subreg

2024-11-18 Thread Jeff Law
On 11/18/24 11:09 AM, Patrick O'Neill wrote: On 11/18/24 09:57, Jeff Law wrote: And stage3 begins... Zdenek's fuzzer caught this one.  Essentially using simplify_gen_subreg directly with an offset of 0 when we just needed a lowpart. The offset of 0 works for little endian, but for big en

Re: [PATCH] libstdc++: Add debug assertions to std::list and std::forward_list

2024-11-18 Thread François Dumont
On 18/11/2024 19:24, François Dumont wrote: On 16/11/2024 02:18, Jonathan Wakely wrote: On Sat, 16 Nov 2024 at 01:09, Jonathan Wakely wrote: While working on fancy pointer support for the linked lists I noticed they didn't have any debug assertions. This adds the obvious non-empty assertion

[PATCH v2 5/8] c: Fix constructor bounds checking for VLA and construct VLA vector constants

2024-11-18 Thread Tejas Belagod
This patch adds support for checking bounds of SVE ACLE vector initialization constructors. It also adds support to construct vector constant from init constructors. gcc/ChangeLog: * c/c-typeck.cc (process_init_element): Add check to restrict constructor length to the minimum vec

[PATCH 01/15] Alpha/testsuite: Run target testing over all the usual optimization levels

2024-11-18 Thread Maciej W. Rozycki
Use `gcc-dg-runtest' test driver rather than `dg-runtest' to run the Alpha testsuite as several targets already do. Add `-Og -g' and `-Oz' as well via ADDITIONAL_TORTURE_OPTIONS to expand coverage. Adjust test options across individual test cases accordingly where required. Discard base-2.c,

Re: [committed][RISC-V][PR target/117595] Fix bogus use of simplify_gen_subreg

2024-11-18 Thread Patrick O'Neill
On 11/18/24 10:30, Jeff Law wrote: On 11/18/24 11:09 AM, Patrick O'Neill wrote: On 11/18/24 09:57, Jeff Law wrote: And stage3 begins... Zdenek's fuzzer caught this one.  Essentially using simplify_gen_subreg directly with an offset of 0 when we just needed a lowpart. The offset of 0 wo

Re: [PATCH 2/2] Flatten anonymous structs in CodeView types

2024-11-18 Thread Mark Harmstone
On 18/11/2024 05:05, Jeff Law wrote: On 11/17/24 9:01 AM, Mark Harmstone wrote: If a CodeView struct, class, or union has as a member an anonymous struct, class, or union, this gets flattened. The sub-struct's members will appear as if they were part of their parent. For this, we move part of

Re: [PATCH 0/8] v4 of libdiagnostics

2024-11-18 Thread David Malcolm
On Wed, 2024-11-13 at 14:10 -0500, David Malcolm wrote: > Here's v4 of my patch kit for "libdiagnostics", which makes GCC's > diagnostics subsystem available as a shared library; see: >   https://gcc.gnu.org/wiki/libdiagnostics > > New in v4: > * tutorial and API documentation (see patch 4) > * ad

Re: [PATCH 2/4] RISC-V: Add interleave pattern.

2024-11-18 Thread 钟居哲
+ int vlen = vec_len.to_constant (); + if (vlen != (int)indices.length ().to_constant ()) +return false; Is it possiable to use unsigned vlen ? So that "(int)" conversion can be elided. juzhe.zh...@rivai.ai From: Robin Dapp Date: 2024-11-17 20:53 To: gcc-patches CC: palmer; kito.cheng;

Re: [PATCH] Fortran: add bounds-checking for ALLOCATE of CHARACTER with type-spec [PR53357]

2024-11-18 Thread Harald Anlauf
Am 18.11.24 um 03:55 schrieb Jerry D: On 11/17/24 2:21 PM, Harald Anlauf wrote: Dear all, the attached patch fixes a rejects-valid / rejects-potentially-valid code issue for  ALLOCATE of CHARACTER with type-spec, and add character length checking with -fcheck=bounds for the case at hand.  It al

[PATCH] RISC-V: testsuite: fix old-style function definition error [NFC]

2024-11-18 Thread Edwin Lu
The following testcase was failing with the warning: old-style function definition ever since the c standard version has been updated. Update the function definition. gcc/testsuite/ChangeLog: * gcc.dg/vect/costmodel/riscv/rvv/dynamic-lmul-ice-3.c: Update function definition. Si

Re: [PATCH] c: fix incorrect TBAA for tagged types across translation units [PR117490]

2024-11-18 Thread Joseph Myers
On Sat, 16 Nov 2024, Martin Uecker wrote: > c: fix incorrect TBAA for tagged types across translation units [PR117490] > > Two different declarations of tagged types in the same translation unit > are incompatible in C before C23 and without tag also in C23. Still, > two such

Re: Ignore conditions guarding __builtin_unreachable in inliner metrics

2024-11-18 Thread Richard Biener
On Sun, Nov 17, 2024 at 1:25 AM Jan Hubicka wrote: > > > > > > > > > > > Am 16.11.2024 um 14:08 schrieb Jan Hubicka : > > > > > > > > Ignore conditions guarding __builtin_unreachable in inliner metrics > > > > > > > > This patch extends my last year attempt to make inliner metric ignore > > > > c

RE: [gcc-wwwdocs PATCH] gcc-15: Mention new ISA and Diamond Rapids support for x86_64 backend

2024-11-18 Thread Jiang, Haochen
Ping for this gcc-wwwdocs patch. Thx, Haochen > From: Haochen Jiang > Sent: Monday, November 11, 2024 11:16 AM > > Hi all, > > This patch will add recent new ISA and arch support for x86_64 backend into > gcc-wwwdocs. > > Ok for gcc-wwwdocs? > > Thx, > Haochen > > --- > htdocs/gcc-15/chang

[committed] c: Allow bool and enum null pointer constants [PR112556]

2024-11-18 Thread Joseph Myers
As reported in bug 112556, GCC wrongly rejects conversion of null pointer constants with bool or enum type to pointers in convert_for_assignment (assignment, initialization, argument passing, return). Fix the code there to allow BOOLEAN_TYPE and ENUMERAL_TYPE; it already allowed INTEGER_TYPE and B

Re: [PATCH 7/8] json: add json parsing support

2024-11-18 Thread Andrew Pinski
On Wed, Nov 13, 2024 at 11:26 AM David Malcolm wrote: > > This patch implements JSON parsing support. > > It's based on the parsing parts of the patch I posted here: > https://gcc.gnu.org/legacy-ml/gcc-patches/2017-08/msg00417.html > with the parsing moved to a separate source file and header, hea

Re: [PATCH] Write binary annotations for CodeView S_INLINESITE symbols

2024-11-18 Thread Mark Harmstone
On 18/11/2024 04:57, Jeff Law wrote: On 11/17/24 8:40 AM, Mark Harmstone wrote: Add "binary annotations" at the end of CodeView S_INLINESITE symbols, which are a series of compressed integers that represent how line numbers map to addresses. This requires assembler support; you will need comm

[committed] i386: Enable *rsqrtsf2_sse without TARGET_SSE_MATH [PR117357]

2024-11-18 Thread Uros Bizjak
__builtin_ia32_rsqrtsf2 expansion generates UNSPEC_RSQRT insn pattern also when TARGET_SSE_MATH is not set. Enable *rsqrtsf2_sse without TARGET_SSE_MATH to avoid ICE with unrecognizable insn. PR target/117357 gcc/ChangeLog: * config/i386/i386.md (*rsqrtsf2_sse): Also enable for !TARGET_SSE_MATH

Re: [RFA] Fix csky and c6x build failures

2024-11-18 Thread Christophe Lyon
On Mon, 18 Nov 2024 at 00:39, Jeff Law wrote: > > > csky fails to build libgcc after the c23 changes because it has a > typedef for bool. AFAICT it's internal to the file, so removing the > typedef isn't an ABI change. > > Similiarly for c6x which includes unwind-arm-common.inc. I suspect > most

Re: [committed][RISC-V][PR target/117595] Fix bogus use of simplify_gen_subreg

2024-11-18 Thread Jeff Law
On 11/18/24 6:30 PM, Patrick O'Neill wrote: On 11/18/24 10:30, Jeff Law wrote: On 11/18/24 11:09 AM, Patrick O'Neill wrote: On 11/18/24 09:57, Jeff Law wrote: And stage3 begins... Zdenek's fuzzer caught this one.  Essentially using simplify_gen_subreg directly with an offset of 0 when

Re: [PATCH] RISC-V: testsuite: fix old-style function definition error [NFC]

2024-11-18 Thread Jeff Law
On 11/18/24 3:44 PM, Edwin Lu wrote: The following testcase was failing with the warning: old-style function definition ever since the c standard version has been updated. Update the function definition. gcc/testsuite/ChangeLog: * gcc.dg/vect/costmodel/riscv/rvv/dynamic-lmul-ice-3.c:

Re: [PATCH] build: Discard obsolete references to $(GCC_PARTS)

2024-11-18 Thread Joseph Myers
On Mon, 18 Nov 2024, Maciej W. Rozycki wrote: > The $(GCC_PARTS) variable was deleted with the Makefile rework in commit > fa9585134f6f ("libgcc move to the top level")[1] back in 2007, and yet > the Ada and Modula 2 frontends added references to this variable later > on, with commit e972fd5281

[PATCH v2 3/8] c: Range-check indexing of SVE ACLE vectors

2024-11-18 Thread Tejas Belagod
This patch adds a check for non-GNU vectors to warn that the index is outside the range of a fixed vector size. For VLA vectors, we don't diagnose. gcc/ChangeLog: * c-family/c-common.cc (convert_vector_to_array_for_subscript): Add range-check for target vector types. --- gcc/c-f

[PATCH v2 6/8] aarch64: Add testcase for C/C++ ops on SVE ACLE types.

2024-11-18 Thread Tejas Belagod
This patch adds a test case to cover C/C++ operators on SVE ACLE types. This does not cover all types, but covers most representative types. gcc/testsuite: * gcc.target/aarch64/sve/acle/general/cops.c: New test. --- .../aarch64/sve/acle/general/cops.c | 579 ++

Re: [PATCH] libstdc++: Add --enable-clocale=ieee_1003.1-2008 [PR57585]

2024-11-18 Thread Rainer Orth
Hi Jonathan, > Do we want something like this for GCC 15? That would be good indeed, as the default on both Solaris 11.4 and, if possible, versions of AIX where it works, too. > Tested x86_64-freebsd and sparc-solaris (although not for a few months). I've given it a try on both i386-pc-solaris2

[PATCH] inline-asm: Add - constraint modifier support for toplevel extended asm [PR41045]

2024-11-18 Thread Jakub Jelinek
Hi! Working virtually out of Baker Island. The following patch on top of https://gcc.gnu.org/pipermail/gcc-patches/2024-November/667276.html https://gcc.gnu.org/pipermail/gcc-patches/2024-November/667735.html https://gcc.gnu.org/pipermail/gcc-patches/2024-November/667737.html patches adds - constr

[PATCH] tree-optimization/117594 - fix live op vectorization for length masked case

2024-11-18 Thread Richard Biener
The code was passing factor == 0 to vect_get_loop_len which always returns an unmodified length, even if the number of scalar elements doesn't agree. It also failed to insert the eventually generated code. Testing in the CI. Richard. PR tree-optimization/117594 * tree-vect-loop.

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

2024-11-18 Thread Jonathan Wakely
On 18/11/24 06:57 +0100, François Dumont wrote: >Hi > >Here is a new proposal with all the cleanup regarding _Const_Base_ptr >that makes support of allocator's fancy pointer type simpler. > >Also submitted as PR: > >https://forge.sourceware.org/gcc/gcc-TEST/pulls/27 > > libstdc++: Add fancy point

[committed] Fix more c23 bool fallout

2024-11-18 Thread Jeff Law
While these haven't shown up in my tester (not configs I test) and I think we're likely going to be deprecating the nds32 target. we might as well go ahead and fix them. I'm going to include this under the pr117628 umbrella. Pushing to the trunk. Jeff commit 1100c0576b0c6f78ede0d3fecfc6c6e81

Re: [PATCH] libstdc++: Add --enable-clocale=ieee_1003.1-2008 [PR57585]

2024-11-18 Thread Rainer Orth
Hi Jonathan, >> I haven't even started investigating. > > Leave it with me, maybe the patch bitrotted since I worked on it, or > maybe I did something stupid. I'll look into it, but not until next > week. fine with me. Thanks for looking into this. FWIW, I've tried a i686-pc-linux-gnu bootstrap

Re: [PATCH v2 4/8] gimple: Handle variable-sized vectors in BIT_FIELD_REF

2024-11-18 Thread Richard Sandiford
Tejas Belagod writes: > Handle variable-sized vectors for BIT_FIELD_REF canonicalization. > > gcc/ChangeLog: > > * gimple-fold.cc (maybe_canonicalize_mem_ref_addr): Handle variable > sized vector types in BIT_FIELD_REF canonicalization. > * tree-cfg.cc (verify_types_in_gimple_ref

[patch,avr,applied] Fix PR117659: Wrong code for shift u24 << 16

2024-11-18 Thread Georg-Johann Lay
Applied the patch below as obvious. It fixes a wrong code bug for u24 << 16 when the input and output registers are not the same. Johann -- AVR: target/117659 - Fix wrong code for u24 << 16. gcc/ PR target/117659 * config/avr/avr.cc (avr_out_ashlpsi3) [case 16]:

Re: [PATCH v4 0/3][RFC]Provide more contexts for -Warray-bounds and -Wstringop-* warning messages

2024-11-18 Thread Qing Zhao
Hi, Kees, Thanks a lot for testing the patch with Linux kernel, and I am so happy that the patch is really helpful to locate the real bugs in the source code. Hopefully it could be put into GCC15… Qing > On Nov 17, 2024, at 00:13, Kees Cook wrote: > > On Tue, Nov 05, 2024 at 04:31:29PM +

Re: Ignore conditions guarding __builtin_unreachable in inliner metrics

2024-11-18 Thread Jan Hubicka
> > Just to quantify a lot, on tramp3d there are 2263 calls declared dead > > and 34206 declared live (by my mini-dce) in fnsummary1. So 6%. > > There are overall 3797 unnecesary stmts and 97263 necessary ones. > > So most of dead stuff are actually calls. > > > > In IPA fnsummary there are 4 dead

[COMMITTED 04/14] ada: Small cleanup in expansion of array aggregates in allocators

2024-11-18 Thread Marc Poulhiès
From: Eric Botcazou Convert_Array_Aggr_In_Allocator does nothing that Late_Expansion cannot do, so this deletes the former and moves its support code for Storage_Model to the latter. No functional changes. gcc/ada/ChangeLog: * exp_aggr.adb (Convert_Array_Aggr_In_Allocator): Delete.

[pushed] Add a timevar for late combine

2024-11-18 Thread Richard Sandiford
When adding late-combine.cc, I forgot to add a timevar for it. Tested on aarch64-linux-gnu & pushed as obvious. Richard gcc/ * timevar.def (TV_LATE_COMBINE): New timevar. * late-combine.cc (pass_data_late_combine): Use it. --- gcc/late-combine.cc | 2 +- gcc/timevar.def | 1

Re: [patch,avr] Adjust comment headers

2024-11-18 Thread Georg-Johann Lay
Am 16.11.24 um 13:19 schrieb Gerald Pfeifer: On Mon, 2 Sep 2024, Georg-Johann Lay wrote: Atmel is no more the AVR manufacturer. This patch removes the manufacturer from the file headers. We also have AVR Manufacturer: Atmel https://www.microchip.com/en-us/products/microcontroller

  1   2   >