[c-family] Small enhancement to implementation of -fdump-ada-spec

2024-05-24 Thread Eric Botcazou
This lets it recognize more preprocessing floating constants. Tested on x86-64/Linux, applied on the mainline. 2024-05-24 Eric Botcazou * c-ada-spec.cc (is_cpp_float): New predicate. (dump_number): Deal with more preprocessing floating constants. (dump_ada_macros

[c-family] Another small fix to implementation of -fdump-ada-spec

2024-05-23 Thread Eric Botcazou
This avoids generating invalid Ada code for functions with a multidimensional array parameter and also cleans things up left and right. Tested on x86-64/Linux, applied on the mainline. 2024-05-23 Eric Botcazou * c-ada-spec.cc (check_type_name_conflict): Add guard

[Ada] Fix PR ada/115168

2024-05-21 Thread Eric Botcazou
Recent changes made to the runtime library broke again its build on Solaris because it uses Solaris threads instead of POSIX threads on this platform. Tested by Rainer, applied on the mainline. 2024-05-21 Eric Botcazou PR ada/115168 * libgnarl/s-taprop__solaris.adb

[PATCH] Fix PR rtl-optimization/115038

2024-05-20 Thread Eric Botcazou
Botcazou PR rtl-optimization/115038 * fold-mem-offsets.cc (fold_offsets): Return 0 if the defining instruction of the register is frame related. 2024-05-20 Eric Botcazou * g++.dg/opt/fmo1.C: New test. -- Eric Botcazoudiff --git a/gcc/fold-mem-offsets.cc b/gcc

Re: [PATCH] Add widening expansion of MULT_HIGHPART_EXPR for integral modes

2024-05-19 Thread Eric Botcazou
Hi, > Just notice that this patch may result in some ICE when build libc++ for the > riscv port, details as below. Please note not all configuration can > reproduce this issue, feel free to ping me if you cannot reproduce this > issue. CC more riscv port people for awareness. Sorry for the

[Ada] Fix PR ada/115133

2024-05-17 Thread Eric Botcazou
The recent changes made to the runtime library broke its build on Solaris because it uses Solaris threads instead of POSIX threads on this platform. Tested by Rainer, applied on the mainline. 2024-05-17 Eric Botcazou Rainer Orth PR ada/115133 * libgnarl/s

[c-family] Small fix to implementation of -fdump-ada-spec

2024-05-17 Thread Eric Botcazou
This avoids declaring anonymous array types as having an aliased component when the layout is packed, as is already done for named array types. Tested on x86-64/Linux, applied on the mainline. 2024-05-17 Eric Botcazou * c-ada-spec.cc (bitfield_used): Move around

[wwwdocs] Document reimplementation of GNU threads library on Windows

2024-05-16 Thread Eric Botcazou
... which happened in GCC 13. Validated with W3C's Validator and applied. -- Eric Botcazoudiff --git a/htdocs/gcc-13/changes.html b/htdocs/gcc-13/changes.html index e324b782..3ab4a101 100644 --- a/htdocs/gcc-13/changes.html +++ b/htdocs/gcc-13/changes.html @@ -770,8 +770,17 @@ You may also want

[PATCH] Add widening expansion of MULT_HIGHPART_EXPR for integral modes

2024-04-29 Thread Eric Botcazou
. We'll use that in a subsequent change to the Ada front-end to generate fast modulo reduction for modular types with nonbinary modulus (a little controversial Ada 95 feature). Tested on x86-64/Linux, OK for the mainline? 2024-04-29 Eric Botcazou * expmed.h

Re: [PATCH] Minor tweaks to code computing modular multiplicative inverse

2024-04-29 Thread Eric Botcazou
> OK. Consider waiting to commit though as we want to make it easy to > cherry pick patches over to the release branch if needed. Sure. There are a couple more changes on top of it, but all can wait a bit. -- Eric Botcazou

[PATCH] Minor tweaks to code computing modular multiplicative inverse

2024-04-29 Thread Eric Botcazou
Hi, this removes the last parameter of choose_multiplier, which is unused, adds another assertion and more details to the description and various comments. Likewise to the closely related invert_mod2n, except for the last parameter. Tested on x86-64/Linux, OK for the mainline? 2024-04-29 Eric

Re: [SPARC] Fix PR target/114416

2024-04-25 Thread Eric Botcazou
> For the 20th anniversary of https://gcc.gnu.org/gcc-3.4/sparc-abi.html, a > new calling convention incompatibility with the vendor compiler (and the > ABI) has been discovered in 64-bit mode, affecting small structures > containing arrays of floating-point components. The decision has been made

[SPARC] Fix PR target/114416

2024-04-25 Thread Eric Botcazou
to fix it on Solaris only at this point. Bootstrapped/regtested on SPARC/Solaris 11.4 and SPARC64/Linux by Rainer (many thanks again) and applied on the mainline. 2024-04-25 Eric Botcazou PR target/114416 * config/sparc/sparc.h (SUN_V9_ABI_COMPATIBILITY): New macro

Re: [PATCH] Fix PR ipa/113996

2024-03-12 Thread Eric Botcazou
> Patch is still OK, but ipa-ICF will only identify the functions if > static chain is unused. Perhaps just picking the winning candidate to be > version without static chain and making ipa-inline to not ICE when calls > with static chain lands to function with no static chain would help us > to

[PATCH] Fix PR ipa/113996

2024-03-11 Thread Eric Botcazou
static chain but the other does not. The proposed fix is just to prevent this identification from occurring. Tested on x86-64/Linux, OK for all active branches? 2024-03-11 Eric Botcazou PR ipa/113996 * ipa-icf.h (sem_function): Add static_chain_present member. * ipa-

Fix PR debug/113519 and debug/113777

2024-03-11 Thread Eric Botcazou
They both come from an oversight of mine in the placement of the DIE created for an enumeration type with reverse scalar storage order. Tested on x86-64/Linux, both GCC and GDB, applied on mainline as obvious. 2024-03-11 Eric Botcazou PR debug/113519 PR debug/113777

[Ada] Fix PR ada/113979

2024-03-07 Thread Eric Botcazou
to the resulting access value (after dereference) like in Expand_Allocator_Expression. Tested on x86-64/Linux, applied on all active branches. 2024-03-07 Eric Botcazou PR ada/113979 * exp_ch4.adb (Expand_N_Allocator): In the subtype indication case, call

[PATCH] Fix internal error in GIMPLE DSE

2024-02-27 Thread Eric Botcazou
>offset is byte aligned and that the trimmed bytes are relative to ref->size, so the patch simply adds an early return if either condition is not fulfilled Tested on x86-64/Linux, OK for all the affected branches? 2024-02-27 Eric Botcazou * tree-ssa-dse.cc (compute_trims):

[Ada] Fix PR ada/113893

2024-02-26 Thread Eric Botcazou
references to the local finalization routine, so the finalization needs to be dropped in this case and the warning adjusted. Tested on x86-64/Linux, applied on all active branches. 2024-02-26 Eric Botcazou PR ada/113893 * exp_ch7.adb (Build_Anonymous_Master): Do not build

[c-family] Fix PR ada/113397

2024-01-16 Thread Eric Botcazou
It is a regression on the mainline for -fdump-ada-spec in a pathological case. Tested on x86-64/Linux, applied on the mainline. 2024-01-16 Eric Botcazou PR ada/113397 * c-ada-spec.cc (check_type_name_conflict): Add guard for the presence of DECL_NAME on a TYPE_DECL

Re: HELP: Questions on unshare_expr

2024-01-15 Thread Eric Botcazou
> Okay, so, the "unsharing everythingā€¯ is done automatically by the compiler > before gimplification? See the blurb at gimplify.cc:835 and below about this. -- Eric Botcazou

Re: [PATCH] Fix debug info for enumeration types with reverse Scalar_Storage_Order

2024-01-10 Thread Eric Botcazou
for the reason described above, so the extra parameter is preexisting for base_type_die, modified_type_die and add_type_attribute. -- Eric Botcazou

[PATCH] Fix debug info for enumeration types with reverse Scalar_Storage_Order

2024-01-09 Thread Eric Botcazou
-01-09 Eric Botcazou * dwarf2out.cc (modified_type_die): Extend the support of reverse storage order to enumeration types if -gstrict-dwarf is not passed. (gen_enumeration_type_die): Add REVERSE parameter and generate the DIE immediately after the existing one

[Ada] Fix PR ada/112781 (2/2)

2024-01-09 Thread Eric Botcazou
, and moving down the assertion in Expand_Simple_Function_Return. Tested on SPARC64/Linux, applied on the mainline and 13 branch. 2024-01-09 Eric Botcazou PR ada/112781 * exp_ch6.ads (Is_Build_In_Place_Function): Adjust description. * exp_ch6.adb

[Ada] Fix PR ada/112781 (1/2)

2024-01-09 Thread Eric Botcazou
and 13 branch. 2024-01-09 Eric Botcazou PR ada/112781 * sem_ch12.adb (Instantiate_Type): Use Etype instead of Base_Type consistently to retrieve the ancestor for a derived type. * sem_ch4.adb (Analyze_Explicit_Dereference): Test Is_Access_Type

[Ada] Fix PR ada/113195

2024-01-09 Thread Eric Botcazou
, applied on the mainline and 13 branch. 2024-01-09 Eric Botcazou PR ada/113195 * gcc-interface/utils2.cc (build_binary_op) : Relax assertion for regular pointer types. 2024-01-09 Eric Botcazou * gnat.dg/specs/anon4.ads: New test. -- Eric Botcazou-- { dg

Fix PR rtl-optimization/113140

2024-01-09 Thread Eric Botcazou
of function. Tested on SPARC64/Linux, applied on the mainline and 13 branch. 2024-01-09 Eric Botcazou PR rtl-optimization/113140 * reorg.cc (fill_slots_from_thread): If we are to branch after the last instruction of the function, create an end label. 2024-01-09 Eric

Fix PR rtl-optimization/113140

2024-01-09 Thread Eric Botcazou
of function. Tested on SPARC64/Linux, applied on the mainline and 13 branch. 2024-01-09 Eric Botcazou PR rtl-optimization/113140 * reorg.cc (fill_slots_from_thread): If we are to branch after the last instruction of the function, create an end label. 2024-01-09 Eric

Re: [PATCH] testsuite: Skip ifcvt-4.c for SPARC V8

2024-01-09 Thread Eric Botcazou
> Conditional moves are not available in SPARC V8. > > gcc/testsuite/ChangeLog: > > * gcc.dg/ifcvt-4.c: Skip for SPARC V8 OK. -- Eric Botcazou

Re: [PATCH] sparc: Char arrays are 64-bit aligned on SPARC

2024-01-09 Thread Eric Botcazou
h GCC 10. I see, thanks for the explanation, the patch is OK then. > For the OK:ed patches (with your changes), can I push them to > release/gcc-13 in addition to master? Sure. -- Eric Botcazou

Re: [PATCH 2/2] sparc: Add errata workaround to membar patterns

2024-01-08 Thread Eric Botcazou
C errata workaround. OK with this change. -- Eric Botcazou

Re: [PATCH] sparc: Treat instructions with length 0 as empty

2024-01-08 Thread Eric Botcazou
> This is to handle the membar_empty instruction that can be generated > when compiling for UT699. > > gcc/ChangeLog: > > * config/sparc/sparc.cc (next_active_non_empty_insn): Length 0 treated > as empty OK without the superfluous parentheses. -- Eric Botcazou

Re: [PATCH 1/2] sparc: Revert membar optimization that is not suitable for LEON5

2024-01-08 Thread Eric Botcazou
sn." > > gcc/ChangeLog: > > * config/sparc/sync.md (*membar_storeload_leon3): Remove > (*membar_storeload): Enable for LEON OK. -- Eric Botcazou

Re: [PATCH] sparc: Char arrays are 64-bit aligned on SPARC

2024-01-08 Thread Eric Botcazou
seen it though. Is that really a warning issued by GCC? -- Eric Botcazou

Re: [PATCH] combine: Don't optimize paradoxical SUBREG AND CONST_INT on WORD_REGISTER_OPERATIONS targets [PR112758]

2023-12-22 Thread Eric Botcazou
runk? Yes, thanks for fixing this. -- Eric Botcazou

Re: [gcc15] nested functions in C

2023-12-07 Thread Eric Botcazou
side-effects > or if they do, there's explicit syntactic sugar to make it clearer. That sounds totally arbitrary though. Algol-derived languages have had nested subprograms for ages, e.g. Pascal or Ada, and they can be very useful. -- Eric Botcazou

Re: [PATCH] gcc: Disallow trampolines when -fhardened

2023-12-07 Thread Eric Botcazou
; is read but never assigned > [-gnatwv] > > so there is no warning. Look at the last line of the test (Ada has not used trampolines for ages!). -- Eric Botcazou

Re: [PATCH] pro_and_epilogue: Call df_note_add_problem () if SHRINK_WRAPPING_ENABLED [PR112760]

2023-12-02 Thread Eric Botcazou
avoid false negatives, just false > positives. If a pass updates an instruction with a REG_UNUSED note, > and the pass is no longer sure whether the register is unused or not, > the pass can just delete the note.) Reintroducing the manual management of such notes would be a step backward. -- Eric Botcazou

[Ada] Fix internal error on function returning dynamically-sized type

2023-11-16 Thread Eric Botcazou
This is PR ada/109881, a tree sharing issue for the internal return type synthesized for a function returning a dynamically-sized type and taking an Out or In/Out parameter passed by copy. Tested on x86-64/Linux, applied on mainline, 13 and 12 branches. 2023-11-16 Eric Botcazou PR

[PATCH] Handle addresses of more constants in IPA-CP

2023-11-11 Thread Eric Botcazou
for the mainline? 2023-11-11 Eric Botcazou * ipa-cp.cc (print_ipcp_constant_value): Move to... (values_equal_for_ipcp_p): Deal with VAR_DECLs from the constant pool. * ipa-prop.cc (ipa_print_constant_value): ...here. Likewise

[PATCH] Handle constant CONSTRUCTORs in operand_compare

2023-11-10 Thread Eric Botcazou
. Bootstrapped/regtested on x86-64/Linux, OK for the mainline? 2023-11-10 Eric Botcazou * fold-const.cc (operand_compare::operand_equal_p) : Deal with nonempty constant CONSTRUCTORs. (operand_compare::hash_operand) : Hash DECL_FIELD_OFFSET and DECL_FIELD_BIT_OFFSET

[PATCH] Add missing return in gori_compute::logical_combine

2023-09-25 Thread Eric Botcazou
Hi, the varying case currently falls through to the 1/true case. Tested on x86_64-suse-linux, OK for mainline, 13 and 12 branches? 2023-09-25 Eric Botcazou * gimple-range-gori.cc (gori_compute::logical_combine): Add missing return statement in the varying case. 2023-09-25

Re: PING^5: [PATCH] rtl-optimization/110939 Really fix narrow comparison of memory and constant

2023-09-25 Thread Eric Botcazou
ttern of bits so, in order to have a 1-to-1 mapping, you need to choose a canonical form. The signed form is probably more natural and, since CONST_INTs have no mode, the same objects are used for e.g. QImode and HImode, which means that you need to sign-extend the bit pattern. -- Eric Botcazou

Re: [PATCH] ssa_name_has_boolean_range vs signed-boolean:31 types

2023-09-12 Thread Eric Botcazou via Gcc-patches
recision > 1, typically 8. -- Eric Botcazou

Re: [committed] libstdc++: Fix compare_exchange_padding.cc test for std::atomic_ref

2023-09-02 Thread Eric Botcazou via Gcc-patches
> This should be fixed now. I rewrote the test to check the padding byte > directly, instead of inspecting a copy of it which might not preserve > the padding bits. Great, thanks! -- Eric Botcazou

Re: [PATCH v2] Store_bit_field_1: Use SUBREG instead of REG if possible

2023-07-19 Thread Eric Botcazou via Gcc-patches
e SIGN_EXTRACT: case ZERO_EXTRACT: return false; default: return true; } } -- Eric Botcazou

Re: [COMMITTED] ada: Follow-up fix for compilation issue with recent MinGW-w64 versions

2023-07-11 Thread Eric Botcazou via Gcc-patches
> It turns out that adaint.c includes other Windows header files than just > windows.h, so defining WIN32_LEAN_AND_MEAN is not sufficient for it. > > gcc/ada/ > > * adaint.c [_WIN32]: Undefine 'abort' macro. I backported it onto the 13 branch. -- Eric Botcazou

Re: [COMMITTED] ada: Fix expanding container aggregates

2023-07-07 Thread Eric Botcazou via Gcc-patches
get expanded as records but instead > as container aggregates. This is not a regression but the problem is quite visible in Ada 2022 so I backported the fix onto the 13 branch. -- Eric Botcazou

Re: [COMMITTED] ada: Fix internal error on aggregate within container aggregate

2023-07-07 Thread Eric Botcazou via Gcc-patches
e parent > node is a container aggregate. This is not a regression but the problem is quite visible in Ada 2022 so I backported the fix onto the 13 branch. -- Eric Botcazou

Re: [COMMITTED] ada: Fix crash on vector initialization

2023-07-07 Thread Eric Botcazou via Gcc-patches
ible in Ada 2022 so I backported the fix onto the 13 branch. -- Eric Botcazou

[PATCH] Fix couple of endianness issues in fold_ctor_reference

2023-06-30 Thread Eric Botcazou via Gcc-patches
for the mainline and some branches? 2023-06-30 Eric Botcazou * gimple-fold.cc (fold_array_ctor_reference): Fix head comment. (fold_nonarray_ctor_reference): Likewise. Specifically deal with integral bit-fields. (fold_ctor_reference): Check that the constructor uses

Re: [PATCH] configure: Implement --enable-host-bind-now

2023-06-27 Thread Eric Botcazou via Gcc-patches
> Arg, once again, I'm sorry. I don't know how this happened. It would > be trivial to fix it but since > > commit 4a48a38fa99f067b8f3a3d1a5dc7a1e602db351f > Author: Eric Botcazou > Date: Wed Jun 21 18:19:36 2023 +0200 > > ada: Fix build of GNAT tools > &g

Re: [PATCH] tree: Fix up save_expr [PR52339]

2023-05-30 Thread Eric Botcazou via Gcc-patches
n to be unchanging. > > Perhaps that should be a new flag that tree_invariant_p can check > instead of TREE_READONLY. Richard earlier suggested a langhook; given that Ada will be the main (sole?) user of it, this would probably be better. -- Eric Botcazou

Re: [COMMITTED] ada: Remove the body of System.Storage_Elements

2023-05-29 Thread Eric Botcazou via Gcc-patches
understand compilation errors during the build." -- Eric Botcazou

Re: [PATCH] Fix artificial overflow during GENERIC folding

2023-05-24 Thread Eric Botcazou via Gcc-patches
own set of problems in GENERIC and it will precisely survive when it is not needed, so I'm not sure that's any better. -- Eric Botcazou

Re: [PATCH] Fix artificial overflow during GENERIC folding

2023-05-24 Thread Eric Botcazou via Gcc-patches
run time, but that's not the case at compile time where we have a finer-grained control (and even different rules) so I don't really see a problem with handling the two cases differently. -- Eric Botcazou

[PATCH] Fix artificial overflow during GENERIC folding

2023-05-24 Thread Eric Botcazou via Gcc-patches
s INTEGER_CSTs to the other, direct path without the intermediate conversion to the unsigned type. Tested on x86-64/Linux, OK for the mainline? 2023-05-24 Eric Botcazou * match.pd ((T)P - (T)(P + A) -> -(T) A): Avoid artificial overflow on constants. 2023-05-24

Re: [PATCH] Fix handling of non-integral bit-fields in native_encode_initializer

2023-05-23 Thread Eric Botcazou via Gcc-patches
ut these non-integral bit-fields (output_constructor et al) so we could even try to share some code. However, in practice, these cases turn out to be rare because the tree_output_constant_def path in gimplify_init_constructor is well guarded. -- Eric Botcazou

[PATCH] Fix handling of non-integral bit-fields in native_encode_initializer

2023-05-22 Thread Eric Botcazou via Gcc-patches
on a byte boundary because they are correctly handled in this case. Bootstrapped/regtested on x86-64/Linux, OK for mainline and 13 branch? 2023-05-22 Eric Botcazou * fold-const.cc (native_encode_initializer) : Apply the specific treatment for bit-fields only if they have

Re: [PATCH] Fix internal error on small array with negative lower bound

2023-05-18 Thread Eric Botcazou via Gcc-patches
_index) + 1); or store_constructor this_node_count = (tree_to_uhwi (hi_index) - tree_to_uhwi (lo_index) + 1); so the proposed form looks better for the sake of consistency. -- Eric Botcazou

[PATCH] Fix internal error on small array with negative lower bound

2023-05-18 Thread Eric Botcazou via Gcc-patches
in output_constructor_bitfield. Tested on x86-64/Linux, OK for the mainline? 2023-05-18 Eric Botcazou * varasm.cc (output_constructor_bitfield): Call tree_to_uhwi instead of tree_to_shwi on array indices. Minor tweaks. 2023-05-18 Eric Botcazou * gnat.dg/specs/array6.ads: New

Re: [PATCH 01/14] ada: use _P() defines from tree.h

2023-05-15 Thread Eric Botcazou via Gcc-patches
); >const bool had_align = TYPE_ALIGN (record_type) > 0; >/* For all-repped records with a size specified, lay the QUAL_UNION_TYPE > out just like a UNION_TYPE, since the size will be fixed. */ This one is not an improvement but more of a coincidence; the rest is OK. -- Eric Botcazou

Re: [PATCH] tree: Fix up save_expr [PR52339]

2023-05-13 Thread Eric Botcazou via Gcc-patches
ined arrays, and I'm testing a patch to that effect, but the first issue might be annoying too. -- Eric Botcazou

Re: [PATCH] tree: Fix up save_expr [PR52339]

2023-05-09 Thread Eric Botcazou via Gcc-patches
need to wait for Eric > before making progress. Let me have a quick look first, as pessimizing loop optimizations in Ada in order to fix a 11-year old PR seems to be a little bit hasty. -- Eric Botcazou

Re: [PATCH] Avoid creating useless debug temporaries

2023-04-26 Thread Eric Botcazou via Gcc-patches
> probably also helps PR109612 and the other similar PR referenced therein. Here's a more aggressive patch in this area, but it regresses guality tests, for example: +FAIL: gcc.dg/guality/ipa-sra-1.c -O2 -DPREVENT_OPTIMIZATION line 27 k == 3 +FAIL: gcc.dg/guality/ipa-sra-1.c -O3 -g

Re: [PATCH] Avoid creating useless debug temporaries

2023-04-25 Thread Eric Botcazou via Gcc-patches
> Haven't looked into detail, but just saving compilation time shouldn't be > the only factor when deciding about debug info stuff, another and perhaps > even more important would be whether it affects the emitted debug info. At least it doesn't change the guality results. -- Eric Botcazou

[PATCH] Avoid creating useless debug temporaries

2023-04-25 Thread Eric Botcazou via Gcc-patches
/regtested on x86-64/Linux, OK for the mainline? 2023-04-25 Eric Botcazou * tree-ssa.cc (insert_debug_temp_for_var_def): Do not create superfluous debug temporaries for single GIMPLE assignments. -- Eric Botcazoudiff --git a/gcc/tree-ssa.cc b/gcc/tree-ssa.cc index a5cad2d344e

[Ada] Remove obsolete configure code in gnattools

2023-04-25 Thread Eric Botcazou via Gcc-patches
Botcazou * configure.ac (TOOLS_TARGET_PAIRS): Remove obsolete settings. (EXTRA_GNATTOOLS): Likewise. * configure: Regenerate. -- Eric Botcazou diff --git a/gnattools/configure.ac b/gnattools/configure.ac index 5b6f34ed9f4..38a28b6ee62 100644 --- a/gnattools/configure.ac +++ b

Re: [PATCH] reload: Handle generating reloads that also clobbers flags

2023-04-18 Thread Eric Botcazou via Gcc-patches
> That "supposed to" is only *one* possible implementation. > The one in CRIS - and I believe the preferred one; one I > should advocate more - is to *always* expose clobbering of > the flags. Yes, both approaches are acceptable IMO and should work. -- Eric Botcazou

Re: [Ada] Fix PR bootstrap/109510

2023-04-15 Thread Eric Botcazou via Gcc-patches
capped on selected platforms. -- Eric Botcazou diff --git a/gcc/ada/gcc-interface/decl.cc b/gcc/ada/gcc-interface/decl.cc index 851a6745f77..20f43de9ea9 100644 --- a/gcc/ada/gcc-interface/decl.cc +++ b/gcc/ada/gcc-interface/decl.cc @@ -4371,10 +4371,6 @@ gnat_to_gnu_entity (Entity_Id gnat_entity

[Ada] Fix PR bootstrap/109510

2023-04-14 Thread Eric Botcazou via Gcc-patches
S. (thanks!) and on x86-64/Linux by me, and applied on the mainline. 2023-04-14 Eric Botcazou PR bootstrap/109510 * gcc-interface/decl.cc (gnat_to_gnu_entity) : Reset align to zero if its value is equal to TYPE_ALIGN and the type is scalar. Set TYPE_USER_ALIGN

Re: [PATCH] combine: Fix simplify_comparison AND handling for WORD_REGISTER_OPERATIONS targets [PR109040]

2023-04-06 Thread Eric Botcazou via Gcc-patches
er code for > WORD_REGISTER_OPERATIONS and sub-word modes which will call nonzero_bits > again for the word mode and decide if it is still safe. Does it work to just replace mode by word_mode in the calls to nonzero_bits? > That patch doesn't change anything at all on the testcase, it is still > miscompiled. OK, too bad, thanks for trying it! -- Eric Botcazou

Re: [PATCH] combine: Fix simplify_comparison AND handling for WORD_REGISTER_OPERATIONS targets [PR109040]

2023-04-06 Thread Eric Botcazou via Gcc-patches
> If we want to fix it in the combiner, I think the fix would be following. > The optimization is about > (and:SI (subreg:SI (reg:HI xxx) 0) (const_int 0x84c)) > and IMHO we can only optimize it into > (subreg:SI (and:HI (reg:HI xxx) (const_int 0x84c)) 0) > if we know that the upper bits of the

Re: [PATCH] dse: Handle SUBREGs of word REGs differently for WORD_REGISTER_OPERATIONS targets [PR109040]

2023-04-06 Thread Eric Botcazou via Gcc-patches
setter. That then records among other things nonzero_bits as 0x8084c." That's a recent addition of mine (ae20d760b1ed69f631c3bf9351bf7e5005d52297) and I think that it probably abuses WORD_REGISTER_OPERATIONS and should either be reverted or restricted to the load case documented in its comment. I can provide testing on SPARC if need be. -- Eric Botcazou

[SPARC] Fix PR target/109140

2023-03-28 Thread Eric Botcazou via Gcc-patches
Eric Botcazou PR target/109140 * config/sparc/sparc.cc (sparc_expand_vcond): Call signed_condition on operand #3 to get the final condition code. Use std::swap. * config/sparc/sparc.md (vcondv8qiv8qi): New VIS 4 expander. (fucmp8_vis): Move around

Re: [PATCH] Modula-2: fix documentation layout

2023-03-27 Thread Eric Botcazou via Gcc-patches
Hi Gaius, > yes indeed and thanks for the patch! You're welcome. The documentation was slightly broken again in the meantime, but nothing really serious this time. Again tested with a modern and an old version of Makeinfo. OK for mainline? 2023-03-27 Eric Botcazou * doc/

(testsuite] Skip gnat.dg/div_zero.adb on Aarch64

2023-03-23 Thread Eric Botcazou via Gcc-patches
For the same reason as on PowerPC. Tested on Aarch64/Linux, applied on the mainline and 12 branch. 2023-03-23 Eric Botcazou * gnat.dg/div_zero.adb: Skip for aarch64*-*-* targets. -- Eric Botcazoudiff --git a/gcc/testsuite/gnat.dg/div_zero.adb b/gcc/testsuite/gnat.dg/div_zero.adb

Re: [PATCH] Fix PR target/90458

2023-02-17 Thread Eric Botcazou via Gcc-patches
> Is there a way to say that the test results should be inverted on a > particular platform (instead of purely unsupported)? Yes, you can do pretty much what you want with the testsuite harness. -- Eric Botcazou

Re: [PATCH] Fix PR target/90458

2023-02-16 Thread Eric Botcazou via Gcc-patches
> This fixes dg.exp/stack-check-2.c, -7, 8, and -16.c, which is great! Try the attached patch. -- Eric Botcazoudiff --git a/gcc/testsuite/lib/target-supports.exp b/gcc/testsuite/lib/target-supports.exp index 227e3004077..d4f036a3f1e 100644 --- a/gcc/testsuite/lib/target-supports.exp +++

[PATCH] Fix PR target/90458

2023-02-15 Thread Eric Botcazou via Gcc-patches
branches? 2023-02-15 Eric Botcazou * config/i386/i386.cc (ix86_compute_frame_layout): Disable the effects of -fstack-clash-protection for TARGET_STACK_PROBE. (ix86_expand_prologue): Likewise. -- Eric Botcazoudiff --git a/gcc/config/i386/i386.cc b/gcc/config/i386/i386

[PATCH] Fix small regression in Ada

2023-02-14 Thread Eric Botcazou via Gcc-patches
It is present on the mainline and 12 branch and comes from Andrew P. and me forgetting about the VOID_TYPE_P case of SAVE_EXPRs. Tested on x86-64/Linux, applied on mainline and 12 branch as obvious. 2023-02-14 Eric Botcazou gcc/ * gimplify.cc (gimplify_save_expr): Add missing guard

Re: [PATCH] don't declare header-defined functions both static and inline

2023-01-31 Thread Eric Botcazou via Gcc-patches
but we should tell them >about it Removing all the above "static" is OK. -- Eric Botcazou

Re: [PATCH] tree-optimization/108522 Use component_ref_field_offset

2023-01-27 Thread Eric Botcazou via Gcc-patches
> OK. PLACEHOLDER_EXPR are only relevant pre simplification. I presume you mean "pre gimplification" here? -- Eric Botcazou

Re: [PATCH 7/9] sparc: Don't add crtfastmath.o for -shared

2023-01-23 Thread Eric Botcazou
DFILE_SPEC): Likewise. > * config/sparc/linux64.h (ENDFILE_SPEC): Likewise. > * config/sparc/sp-elf.h (ENDFILE_SPEC): Likewise. > * config/sparc/sp64-elf.h (ENDFILE_SPEC): Likewise. OK, thanks. -- Eric Botcazou

[c-family] Small fix for -fdump-ada-spec

2023-01-13 Thread Eric Botcazou via Gcc-patches
This is needed to support the _Float32 and _Float64 types. Tested on x86-64/Linux, applied on the mainline. 2023-01-13 Eric Botcazou c-family/ * c-ada-spec.cc (is_float32): New function. (is_float64): Likewise. (is_float128): Tweak. (dump_ada_node) : Call

[PATCH] Fix PR rtl-optimization/108274

2023-01-13 Thread Eric Botcazou via Gcc-patches
Hi, unlike other IPA passes, the ICF pass can be run at -O0 and some testcases rely on this in the testsuite. Now it effectively creates a tail call so the DF information needs be updated in this case after epilogue creation. Tested on x86-64/Linux, OK for mainline? 2023-01-13 Eric

[PATCH] Fix PR tree-optimization/108199

2023-01-11 Thread Eric Botcazou via Gcc-patches
Hi, this fixes the problematic interaction between bitfields, unions, SSO and SRA. Tested on x86-64/Linux and SPARC/Solaris, OK for all active branches? 2023-01-11 Eric Botcazou Andreas Krebbel PR tree-optimization/108199 * tree-sra.cc (sra_modify_expr): Deal

[PATCH] Modula-2: fix documentation layout

2023-01-09 Thread Eric Botcazou via Gcc-patches
allows me to build it with these older versions, as well as with modern versions. OK for mainline? 2023-01-09 Eric Botcazou * doc/gm2.texi (Overview): Fix @node markers. (Using): Likewise. Remove subsections that were moved to Overview from the menu and move others around

Re: Adding a new thread model to GCC

2023-01-09 Thread Eric Botcazou via Gcc-patches
> fixed now. > bootstrapped successfully! Thanks for fixing it. Another way out is to hide the Win32 API by defining __GTHREAD_HIDE_WIN32API like libstdc++ does in its header files. -- Eric Botcazou

Re: Adding a new thread model to GCC

2022-12-16 Thread Eric Botcazou via Gcc-patches
ouldn't be very much use without the libgcc > changes. Sure thing. -- Eric Botcazou

Fix PR ada/107810

2022-11-29 Thread Eric Botcazou via Gcc-patches
This just makes the pattern matching more robust. Tested on SPARC64/Solaris and x86-64/Linux, applied on the mainline. 2022-11-29 Eric Botcazou PR ada/107810 * gnat.dg/unchecked_convert9.adb: Adjust pattern. -- Eric Botcazoudiff --git a/gcc/testsuite/gnat.dg

[PATCH] Fix thinko in operator_bitwise_xor::op1_range

2022-11-25 Thread Eric Botcazou via Gcc-patches
Botcazou * range-op.cc (operator_bitwise_xor::op1_range): Fix thinko. 2022-11-25 Eric Botcazou * gnat.dg/opt100.adb: New test. * gnat.dg/opt100_pkg.adb, gnat.dg/opt100_pkg.ads: New helper. -- Eric Botcazoudiff --git a/gcc/range-op.cc b/gcc/range-op.cc index 6fa3b151596

[PATCH] Fix wrong array type conversion with different storage order

2022-11-22 Thread Eric Botcazou via Gcc-patches
a memcpy/memmove in this case. Tested on x86-64/Linux, OK for the mainline? 2022-11-22 Eric Botcazou * tree-loop-distribution.cc (loop_distribution::classify_builtin_ldst): Bail out if source and destination do not have the same storage order. 2022-11-22 Eric Botcazou

Re: [PATCH] ARM: Make ARMv8-M attribute cmse_nonsecure_call work in Ada

2022-11-21 Thread Eric Botcazou via Gcc-patches
> Ok if no regressions, perhaps the test needs to be in the ada test suite ? Thanks. Sure, testcase added to gnat.dg like so: * gnat.dg/machine_attr2.ads, gnat.dg/machine_attr2.adb: New test. -- Eric Botcazoupackage Machine_Attr2 is type Non_Secure is access procedure; pragma

Re: [PATCH] Restore RTL alias analysis for hard frame pointer

2022-11-09 Thread Eric Botcazou via Gcc-patches
a-1.c -O2 -flto -fno-use-linker-plugin -flto- partition=none -DPREVENT_OPTIMIZATION line 24 i == 5 present on the gcc-12 branch wrt the gcc-11 branch (apparently nobody really cares about the guality testsuite on x86/Linux). * gcc.dg/guality/param-6.c: New test. -- Eric Botcazou/* {

Re: [PATCH] rtl: Try to remove EH edges after {pro, epi}logue generation [PR90259]

2022-11-08 Thread Eric Botcazou via Gcc-patches
nstalled, do you > think testing Ada on ppc64le is enough? Sure, thanks for having done it! -- Eric Botcazou

Re: [PATCH] rtl: Try to remove EH edges after {pro, epi}logue generation [PR90259]

2022-11-08 Thread Eric Botcazou via Gcc-patches
> It looks reasonable - OK if the others CCed have no comments. My only comment is that it needs to be tested with languages enabling -fnon- call-exceptions by default (Ada & Go), if not already done. -- Eric Botcazou

Re: [PATCH] maintainer-scripts/gcc_release: compress xz in parallel

2022-11-07 Thread Eric Botcazou via Gcc-patches
>I build GCC regularly from the weekly snapshots >and so the decompression time adds up. But is very largely dwarfed by the build time of the compiler, isn't it? -- Eric Botcazou

Re: [PATCH 1/2] gcc/file-prefix-map: Allow remapping of relative paths

2022-11-07 Thread Eric Botcazou via Gcc-patches
> Eric, can you push the approved fix for this issue (look for a message > from Richard P day or two back, approved by Richi)? I'm dealing with a > medical issue and heading offline again momentarily. Sure, done. -- Eric Botcazou

Re: [PATCH][RFC] tree-optimization/107389 - use __builtin_assume_alignment at -O0

2022-11-07 Thread Eric Botcazou via Gcc-patches
ple_opt_pass > { > public: > > @@ -4204,14 +4205,17 @@ public: > : gimple_opt_pass (pass_data_fold_builtins, ctxt) > >{} > > + bool gate (function *) final override { return O0 == !optimize; } O0 as suffix is fine, but please avoid using it as a standalone identifier. -- Eric Botcazou

  1   2   3   4   5   6   7   8   9   10   >